From patchwork Wed Nov 10 10:59:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DC4CC433F5 for ; Wed, 10 Nov 2021 10:59:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 68B6A611BF for ; Wed, 10 Nov 2021 10:59:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231418AbhKJLCe (ORCPT ); Wed, 10 Nov 2021 06:02:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231401AbhKJLCd (ORCPT ); Wed, 10 Nov 2021 06:02:33 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B075BC0613F5 for ; Wed, 10 Nov 2021 02:59:46 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id c4so2350523pfj.2 for ; Wed, 10 Nov 2021 02:59:46 -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=QYYqWkSF0jbV84eY1f/qlBJe1yt7+OpWykcTHwVzfUs=; b=YPOyr3wozw0D/eHhgHNRiEI8BOWdv6kMuV3VZWqCLN5TcKYU9MSpBsEa+U76q9tEvU AdgPsekD9mgYzO/7J9hUj6iM5a8DgJ6+5tEVDgYLuYJN90L9Spy4RUq2O/C1VHxO/fmY 88Cl3Snoxggqu2Ce55TvuzfiZXSvhUQUTiCCMiJgDGxV6om+vDS6L13G+tgiunZWCmwd bjWZ3ylvRZkL993HiC11vGSitMkEviAVoEExZp5z0zdFFy4tgU3/VvrWwIYO3B/5v2dZ J8xfL1px342ZFTB2udE0DLwjMsVVDA2MMcX/Ov0h/mIvzNns77rss53MmiEeVkqObJou cOcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QYYqWkSF0jbV84eY1f/qlBJe1yt7+OpWykcTHwVzfUs=; b=HAqe2HGEpmw1M8wWc9FP/xE1Wm6sOdI/U947+ymiBznupYZudn4BYdIhav7Wcf1yc+ p11xZ1Zg1mqJyd0qdJCpqHVHmgEiZ1/MuyzdRCc4SdO5BLSKCljRBMQJbcemewgBJDAw mesF8elX6ZJUwC3QZNLvHm59P128+bJBXKv1c6MPfl8LBx9pETiMSFirzSXw9T5eARRD v2eshXCnGTD5L8TZ1ICYA7r4ST43979GgXV/2wo3Khj9UuUrdP5efkM3mjDQp883khms pkZA3RrpvqCf4/Jc4ColQ/FafLUfuz8wjFvkx6SelB1VnEZkboOyw70qvo3fWk4waHwE qYyg== X-Gm-Message-State: AOAM531sCsoLhAXv+gLpJ7n3KwHx3oz7pw+WW+/VVvuaf2vPR60zXVAr LhXNrpIqnLxnHazenTLdKsbYLVtm6jPU+w== X-Google-Smtp-Source: ABdhPJw57NcpOzofx+IMYY43mlLCAtfB8iyjkZ0/QQx32Ip2jplTFylh/FMnlUzaPdjV5w0pXSKr2w== X-Received: by 2002:a63:86c1:: with SMTP id x184mr11206316pgd.114.1636541986052; Wed, 10 Nov 2021 02:59:46 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.02.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 02:59:45 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 01/22] arm64: dts: qcom: msm8996: Fix qcom,controlled-remotely property Date: Wed, 10 Nov 2021 16:29:01 +0530 Message-Id: <20211110105922.217895-2-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Property qcom,controlled-remotely should be boolean. Fix it. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index bccc2d0b35a8..27683d7fdfe6 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -713,7 +713,7 @@ cryptobam: dma@644000 { clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <0>; - qcom,controlled-remotely = <1>; + qcom,controlled-remotely; }; crypto: crypto@67a000 { From patchwork Wed Nov 10 10:59:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611847 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E0E0C433FE for ; Wed, 10 Nov 2021 10:59:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2DA4961247 for ; Wed, 10 Nov 2021 10:59:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231174AbhKJLCk (ORCPT ); Wed, 10 Nov 2021 06:02:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230440AbhKJLCi (ORCPT ); Wed, 10 Nov 2021 06:02:38 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B483BC061764 for ; Wed, 10 Nov 2021 02:59:51 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id j5-20020a17090a318500b001a6c749e697so1581152pjb.1 for ; Wed, 10 Nov 2021 02:59:51 -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=xmXHtUph5kI3A4THoshYaiB9SXE1WqSgPuWSYTceQ14=; b=XMGVuBzJ9Ua636COgZ7s+PAk3M23S6fAVhvJYTfxGzerPvlwM1qTsepNn8Fq4x+Y6l KDt/KPHMyXLN1S/Jnp9dgOm4t9KBrO+iqImjtjru4DILZdMpWzuTe/6zlOU5xA47lMpi me77Ax88fBqKXc9QIgb3zXEnUKJUQH+EwcbAqz6iQ9A3MYMCa3hCiw94u7G7cLB5LRm9 UJNuznl09pdVaCuxNwWljMrhaav1Jj7QotTO9e8Vej/L4TrbyjNj9Azg0zlkztjbzbN+ ARNq4RjsGN/AR5VMvVHAlcr5yNqbdv3Idq1GGoKd9MFWRxO0f5rNa9ZpvF9TvRyxhYbY albg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xmXHtUph5kI3A4THoshYaiB9SXE1WqSgPuWSYTceQ14=; b=nyMe+6rLdhcu2LsumIFzCNCQuEUWhtCCy3rL+XIKKiG6fDb7NhRrvIJTKox71wFCR7 BaC2a3x3k3FHqvwzsC6NN2HoynFNR4vj5s01V6jDFtDYyogNF46+EntrHy03OV5I3asI 2TQGXeqe3XWS7X3FzQhKbBZloHY44nmDPWD8gpN54D0tX+eqhYTgzDVOA2umMEBIm8A4 ElfnO294k7MzrjExA78S1S9mUmV9QdMyM5sImVknRc6QfhxZAWf+rj5bJM635+wb9U+e NBYiagw1nZNjVTOXg230Y87+rFcqAv+rb8VUnsvBcsXK9E82po0ER6q8QyAc3WEq/wJA edxA== X-Gm-Message-State: AOAM532JmWuYJDx9RrBuVrzi6QfsU3hwlmJF3rDjg14aeyp2H1d28dZ+ T4P8lUk5nX14bcTvA1Jg2SWng7QkAOoacA== X-Google-Smtp-Source: ABdhPJy4ts8w7Xkiy9SPbaVv/tdNYX5gLSvj68Q0W/rZCt0biWFoqI2+HODRQOYEkFQFNXDuG/+AFA== X-Received: by 2002:a17:902:8505:b0:142:892d:918 with SMTP id bj5-20020a170902850500b00142892d0918mr14860752plb.39.1636541991083; Wed, 10 Nov 2021 02:59:51 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.02.59.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 02:59:50 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 02/22] arm64: dts: qcom: msm8996: Fix 'dma' nodes in dts Date: Wed, 10 Nov 2021 16:29:02 +0530 Message-Id: <20211110105922.217895-3-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Preparatory patch for subsequent patch in this series which converts the qcom_bam_dma device-tree binding into YAML format. Correct dma-controller node inside msm8996 dts, which leads to following errors with 'make dtbs_check': dma@164400: $nodename:0: 'dma@164400' does not match '^dma-controller(@.*)?$' Fix the same. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Reviewed-by: Vinod Koul --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 27683d7fdfe6..508cd9d06350 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -705,7 +705,7 @@ tsens1: thermal-sensor@4ad000 { #thermal-sensor-cells = <1>; }; - cryptobam: dma@644000 { + cryptobam: dma-controller@644000 { compatible = "qcom,bam-v1.7.0"; reg = <0x00644000 0x24000>; interrupts = ; From patchwork Wed Nov 10 10:59:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611849 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEC3CC4332F for ; Wed, 10 Nov 2021 10:59:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B41C461248 for ; Wed, 10 Nov 2021 10:59:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231495AbhKJLCp (ORCPT ); Wed, 10 Nov 2021 06:02:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231487AbhKJLCo (ORCPT ); Wed, 10 Nov 2021 06:02:44 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E02D1C06127A for ; Wed, 10 Nov 2021 02:59:56 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id b13so2723057plg.2 for ; Wed, 10 Nov 2021 02:59:56 -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=DQqprj5LG6fM+PnCA7QJB2prIZNlY3Ax3gSE2z4dNwU=; b=eiu8AHmDAI97fZsoLR9/XsptFE0RJMPgDGXqW69j/pRQPpdajZlgHb/KZdKu4IWngq 63P0LtdCoTudc7xlCgWF+79CFFiPIJCxMXgOzkfi4boYeQfAgKqNhegPyZSu4xelYIeP RC9dXW6iStMXhu1VkyJxDBH7nc2YVCg5UGnSvF7rzpMY2FTDzo/bYTT2Eufynx2QB8EX wEv1+084riEg50HJuhp2AZaFJlyYsZjDIFUHLsnpWAWYGHB19c1IOIw4iAdGTca2CZrb 6bv/BoV1B5h4zqD9/hCuHRiSSzrwI3DXltBD+Xwz6vK8yzBEWEst4fiI6ZKTN5Vj+C2J mizg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DQqprj5LG6fM+PnCA7QJB2prIZNlY3Ax3gSE2z4dNwU=; b=rO0tohDIilCMsyUvgVyzNiTiH26nC2nNbXAcJBdR3I7tnhvhuLZj+4OR/ya26xgu8f 6yALGI7fOvkUfIzTD5r9sBI4Ro1unFs2JYBKzlOhWnJrDCTlo6rTV0SSlP/meBPLSiyh 60IJ718kZFhr2Kdi6ZD3ZumCOC2Cx5+ju2SvgTsopwfyrksmPKE006CAfAweR7hX02iR TPY9ehBmcOEuM3jjtxVV9mwqvEKM+kmlZ2m9XUNct/nOJwBXnqyeSdXX0JW64pjwbDbC YLvm5QC7MN/2I+EfNHGDcCevbw33DKlFwoTkn5kuavg13sr9/YQaKbW/CEYOarnZyRfW WuNA== X-Gm-Message-State: AOAM5314+ZTl5gthWux0Ts9tSgDHglaFX66VBltsg14ga+fCmaASRpVl QVBqI/47iuRSlZaw4N2QufRAuapmFXM6vA== X-Google-Smtp-Source: ABdhPJzBJKPodrTJGYontibHgSmatnRgOIH2MHmjmMSV1tKT33Qkk2cM7Atp/dLq5tLJrVfoRPFVKg== X-Received: by 2002:a17:90b:4f85:: with SMTP id qe5mr15629740pjb.167.1636541996221; Wed, 10 Nov 2021 02:59:56 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.02.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 02:59:55 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 03/22] dt-bindings: qcom-bam: Convert binding to YAML Date: Wed, 10 Nov 2021 16:29:03 +0530 Message-Id: <20211110105922.217895-4-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Convert Qualcomm BAM DMA devicetree binding to YAML. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- .../devicetree/bindings/dma/qcom_bam_dma.txt | 50 ---------- .../devicetree/bindings/dma/qcom_bam_dma.yaml | 91 +++++++++++++++++++ 2 files changed, 91 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/dma/qcom_bam_dma.txt create mode 100644 Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt b/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt deleted file mode 100644 index cf5b9e44432c..000000000000 --- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt +++ /dev/null @@ -1,50 +0,0 @@ -QCOM BAM DMA controller - -Required properties: -- compatible: must be one of the following: - * "qcom,bam-v1.4.0" for MSM8974, APQ8074 and APQ8084 - * "qcom,bam-v1.3.0" for APQ8064, IPQ8064 and MSM8960 - * "qcom,bam-v1.7.0" for MSM8916 -- reg: Address range for DMA registers -- interrupts: Should contain the one interrupt shared by all channels -- #dma-cells: must be <1>, the cell in the dmas property of the client device - represents the channel number -- clocks: required clock -- clock-names: must contain "bam_clk" entry -- qcom,ee : indicates the active Execution Environment identifier (0-7) used in - the secure world. -- qcom,controlled-remotely : optional, indicates that the bam is controlled by - remote proccessor i.e. execution environment. -- num-channels : optional, indicates supported number of DMA channels in a - remotely controlled bam. -- qcom,num-ees : optional, indicates supported number of Execution Environments - in a remotely controlled bam. - -Example: - - uart-bam: dma@f9984000 = { - compatible = "qcom,bam-v1.4.0"; - reg = <0xf9984000 0x15000>; - interrupts = <0 94 0>; - clocks = <&gcc GCC_BAM_DMA_AHB_CLK>; - clock-names = "bam_clk"; - #dma-cells = <1>; - qcom,ee = <0>; - }; - -DMA clients must use the format described in the dma.txt file, using a two cell -specifier for each channel. - -Example: - serial@f991e000 { - compatible = "qcom,msm-uart"; - reg = <0xf991e000 0x1000> - <0xf9944000 0x19000>; - interrupts = <0 108 0>; - clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>, - <&gcc GCC_BLSP1_AHB_CLK>; - clock-names = "core", "iface"; - - dmas = <&uart-bam 0>, <&uart-bam 1>; - dma-names = "rx", "tx"; - }; diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml new file mode 100644 index 000000000000..3ca222bd10bd --- /dev/null +++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/qcom_bam_dma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: QCOM BAM DMA controller binding + +maintainers: + - Bhupesh Sharma + +description: | + This document defines the binding for the BAM DMA controller + found on Qualcomm parts. + +allOf: + - $ref: "dma-controller.yaml#" + +properties: + compatible: + enum: + - qcom,bam-v1.3.0 # for APQ8064, IPQ8064 and MSM8960 + - qcom,bam-v1.4.0 # for MSM8974, APQ8074 and APQ8084 + - qcom,bam-v1.7.0 # for MSM8916 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: bam_clk + + interrupts: + minItems: 1 + maxItems: 31 + + num-channels: + maximum: 31 + description: + Indicates supported number of DMA channels in a remotely controlled bam. + + "#dma-cells": + const: 1 + description: The single cell represents the channel index. + + qcom,ee: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + description: + Indicates the active Execution Environment identifier (0-7) + used in the secure world. + + qcom,controlled-remotely: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates that the bam is controlled by remote proccessor i.e. + execution environment. + + qcom,num-ees: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 31 + default: 2 + description: + Indicates supported number of Execution Environments in a + remotely controlled bam. + +required: + - compatible + - reg + - interrupts + - "#dma-cells" + - qcom,ee + +additionalProperties: false + +examples: + - | + #include + dma-controller@f9984000 { + compatible = "qcom,bam-v1.4.0"; + reg = <0xf9984000 0x15000>; + interrupts = <0 94 0>; + clocks = <&gcc GCC_BAM_DMA_AHB_CLK>; + clock-names = "bam_clk"; + #dma-cells = <1>; + qcom,ee = <0>; + }; From patchwork Wed Nov 10 10:59:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611851 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90C11C433FE for ; Wed, 10 Nov 2021 11:00:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7DAFE61205 for ; Wed, 10 Nov 2021 11:00:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231551AbhKJLC6 (ORCPT ); Wed, 10 Nov 2021 06:02:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231598AbhKJLCx (ORCPT ); Wed, 10 Nov 2021 06:02:53 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00783C061210 for ; Wed, 10 Nov 2021 03:00:01 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id b13so2723191plg.2 for ; Wed, 10 Nov 2021 03:00:01 -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=peaVpA9FhN/Vc52TS1nlumYAVj2G5wsFUHbVuVwYxEc=; b=I0pp1973B+/mL+qLzoqDH844dZuiimsjhHWNDXNEcoTwN9T+W7zx49z6sJYI0IeeiF CuHr2iFikkyiDMmJ0OOtZ/gWPoNAsCyW+gsQaBc2rCf7ml++GRVqQpGs0IjIPlr82OgQ 0J3shYvFZmfP21m6qahrqEhEH7CkPTrJzrOtbC6l6zoLPmq40js7SPT83Qs7ZAw2rCgS wCdhnVYKtj+YoAspYSH/xwBc71ffwpaxz2+ExvCioElCOX5KJirOJLyf6kIx+kZosYIz 5ELMkR/WJZOH7NZzpPkxjB61dhiPfgB3G92rNMNOhcR/23VIAkyZlDYnpifEd1WV61nA oBpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=peaVpA9FhN/Vc52TS1nlumYAVj2G5wsFUHbVuVwYxEc=; b=uDxDJcBlNrlf/nW4HSQ7fr2rP4DrhL2ynXWL2QslKyzVS1fxprUES69zf9OuVDqsrR PHy0bzVyvjjx+eRKjOq9Fp1p//NhHV4Do6/GXpxH2m1S2AfteTpp2TiI6UwylKfThAil sdQ1kikNWAtqejL8J8WZxYpzaRqDd6O85QINz4UdrieVULwPwOidpfNAEdAuUczAtKi+ YpLrQ9OAY3IhS18ik690bUeJhCE1SYos4TqIEwtFM+oTlFgHFbKePseY5S7bznN3NxFq xNW9daItQdXBWVsat4SWQnmKeChJ48worvZAtiqVLJwBXDmyOvXR2SUAcXT8Cs6fuCZm RoVQ== X-Gm-Message-State: AOAM532fSy9+iwB8Jid+sW06YE2jHwUOdJ9WCczown/oLYXGo5tqsbGG rzlSzzBYKw39v7vN4nSCLoSwi2Z2HowCQg== X-Google-Smtp-Source: ABdhPJww5ePwPiazLWacGwZAiQVioAsM/0bZxgb+wuEvmSOomy6uvG9/aOpiW/bTJfBNx0oAwBWbJQ== X-Received: by 2002:a17:903:246:b0:13f:75bb:cabd with SMTP id j6-20020a170903024600b0013f75bbcabdmr15103212plh.30.1636542001334; Wed, 10 Nov 2021 03:00:01 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.02.59.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:00 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 04/22] dt-bindings: qcom-bam: Add 'interconnects' & 'interconnect-names' to optional properties Date: Wed, 10 Nov 2021 16:29:04 +0530 Message-Id: <20211110105922.217895-5-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add new optional properties - 'interconnects' and 'interconnect-names' to the device-tree binding documentation for qcom-bam DMA IP. These properties describe the interconnect path between bam and main memory and the interconnect type respectively. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Acked-by: Rob Herring --- Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml index 3ca222bd10bd..20e734448c1f 100644 --- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml +++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml @@ -45,6 +45,14 @@ properties: const: 1 description: The single cell represents the channel index. + interconnects: + maxItems: 1 + description: + Interconnect path between bam and main memory. + + interconnect-names: + const: memory + qcom,ee: $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 From patchwork Wed Nov 10 10:59:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611853 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9438FC433F5 for ; Wed, 10 Nov 2021 11:00:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EADA611BF for ; Wed, 10 Nov 2021 11:00:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231643AbhKJLDM (ORCPT ); Wed, 10 Nov 2021 06:03:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231645AbhKJLC5 (ORCPT ); Wed, 10 Nov 2021 06:02:57 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31E24C061226 for ; Wed, 10 Nov 2021 03:00:07 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id p18-20020a17090ad31200b001a78bb52876so1324492pju.3 for ; Wed, 10 Nov 2021 03:00:07 -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=rbApVhsArFiEK2jewYhlo8Ja8onBMQkN7/T+JTYi1Gg=; b=peNYxpcs7mtexs3d0yeF1cCOMVzTtj7Nz8HEF2MiJ8xwua8BkFZ3CwUek0oI3Jo56c syhvi6+PbvMGofCX0Z1T5hPShyFSd7EP6+AII3LnVJpoFRkomKQXJaBkenu/IM/u32ou IVAhiOmwZW3D+4jpzCDINBlQdvZCBXeuGu4eFOwvCNlmPyvMIKG29fgE72IF6bfMTiF/ kV1Am+HwmxQr6ICkpZAVPvnKjw9Zj2l2aCklTTMjdHagaDh77g0Es0Fpnvzf7J4XrIrc UOf3mA9YcSelXv5MHMUo5nJoWoNuCh9BuljuespUonCnNGe/AsI9+qZjcKx1NKqIAioi 9TxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rbApVhsArFiEK2jewYhlo8Ja8onBMQkN7/T+JTYi1Gg=; b=r0iC28W2eh8gYx8BhPdsMmVXwj4mbotNij6NnZMGb8Oa7AwB7XsR4RkrrKx5Zm0BQn ex4aex/Z5J6ihWLTN+s2VB2qRsILGyYmGEsd6/11RfYWCbg8f9Sf9AS0vxjQB8kNIIib h3YT1PKX0dcKSVTjsiAWCy6eZC//zScqJfOzkLqqomcpd1fZ/Bz4ywdWbfpMI36PPQZ3 VxCp/9RHW6fkEcB6fDqttoHI8QniwMAkaZ7oOjJEc5xKLh9v1XsohbJAS9TBWDb34Ff/ aUtOlzPq/lOMv+cpvZC+vLvZxt4caWWxRPrXlRtoevlbOgWwoKVlCnwS5O11u7lRKbfc CAZw== X-Gm-Message-State: AOAM531ecyiQ/PoqEZwz8OehjDghNgBhSd9ubiWws4UUze8Vqk4/Z3oE LC5cAiOr+Mw09QhRzlhKwbvIuV54eMiuqQ== X-Google-Smtp-Source: ABdhPJweMujZoY1RGGyRy8cWHOVOH511XlIDYHU4XmaLF98GhNDmFbd+sDc/91gHQ/VFeu2MpAfZcg== X-Received: by 2002:a17:902:da81:b0:141:fa9d:806d with SMTP id j1-20020a170902da8100b00141fa9d806dmr14548568plx.26.1636542006449; Wed, 10 Nov 2021 03:00:06 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:06 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 05/22] dt-bindings: qcom-bam: Add 'iommus' to optional properties Date: Wed, 10 Nov 2021 16:29:05 +0530 Message-Id: <20211110105922.217895-6-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add 'optional' property - 'iommus' to the device-tree binding documentation for qcom-bam DMA IP. This property describes the phandle(s) to apps_smmu node with sid mask. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Acked-by: Rob Herring --- .../devicetree/bindings/dma/qcom_bam_dma.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml index 20e734448c1f..cfff3a2286fb 100644 --- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml +++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml @@ -53,6 +53,12 @@ properties: interconnect-names: const: memory + iommus: + minItems: 1 + maxItems: 8 + description: + phandle(s) to apps_smmu node with sid mask. + qcom,ee: $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 @@ -96,4 +102,8 @@ examples: clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <0>; + iommus = <&apps_smmu 0x584 0x0011>, + <&apps_smmu 0x586 0x0011>, + <&apps_smmu 0x594 0x0011>, + <&apps_smmu 0x596 0x0011>; }; From patchwork Wed Nov 10 10:59:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611855 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4455BC433FE for ; Wed, 10 Nov 2021 11:00:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30524611BF for ; Wed, 10 Nov 2021 11:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231563AbhKJLDU (ORCPT ); Wed, 10 Nov 2021 06:03:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231594AbhKJLC7 (ORCPT ); Wed, 10 Nov 2021 06:02:59 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E622C06120F for ; Wed, 10 Nov 2021 03:00:12 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id h24so1256490pjq.2 for ; Wed, 10 Nov 2021 03:00:12 -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=cMr0eE8FXgPe+QXcGVoNpVzyu/9rj5/pkeXUEo39aLo=; b=WvLNS+ggr7y59JU7GQNkZ16qg2QM7b5NhBYESPwK0gzPRVg7QE8HFXrALmBXcytmqJ JjD3zTTk78kldYjj4SIyaXQjdJPFu8UES1W3iJx9bsvMucETp5FdWsloIHj+9nub+FlI T+eaEOFxN6Xf9NZFdgGlOwZtyfh4eplPJqV4UIT8p1CZRVzVHTkOsPssRf0AvMm93tke i3gJVZbq7MLHYfM8M93NbWLGqIGh9tRTBOGoDek6pV6VYHfLXFZzMAcExWXw0zQ/aI+Q iYGn78bkkTPMbyfBdutcQO1JzhwFNwe+EZ2MS3nhPBb/R8pjpUxvTfQhBupkmPkdfYwu o5aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cMr0eE8FXgPe+QXcGVoNpVzyu/9rj5/pkeXUEo39aLo=; b=0a8rh3MXUqBjfze+yGytm2YU69E1jIg1HMna/GExEyV706vfw+/60A4XH/vT+F1dyU +5++VDxstqstNByoaNsLN+Uts98U8w34Q9WSNMZX78ZdWee6Nfh8/bt5xyqsp0zu0eL0 +16GjMwcpBOSV/KsYA2yf4WwXexk3c8PHE3RYD0BIxuEPXYHk9t6CVXxIScX160Ao49e zDzrlotSOITnHZ8ypw5U7CFHvlGQn5cn0RSDrgmpJpIa4tZHTb66STxivXI3yy8v4ZbP qIUQ0sTFQWHcthk3ULECVol1qfmFxWGwUP78K4IVLh3QO/yP+yb3j7nL7J+VBm+GeZ9/ 98xw== X-Gm-Message-State: AOAM531FrSYOfizbkPJ+ORelqoQCi44BkJtKrYr+MJu7yixIxAShvTP/ XPsT3lWAF5lRcvFvogtlsjCYZkocRFytkA== X-Google-Smtp-Source: ABdhPJzvVpgiH2PlMxXWAmipSkGsWQhyKhW8YmToX7VhyCW0Zali00uwZ+BsJuQ7Wd8QuR87/F3Fpg== X-Received: by 2002:a17:902:e851:b0:142:19fe:982a with SMTP id t17-20020a170902e85100b0014219fe982amr14573280plg.13.1636542011471; Wed, 10 Nov 2021 03:00:11 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:11 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 06/22] dt-bindings: qcom-bam: Add "powered remotely" mode Date: Wed, 10 Nov 2021 16:29:06 +0530 Message-Id: <20211110105922.217895-7-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org In some configurations, the BAM DMA controller is set up by a remote processor and the local processor can simply start making use of it without setting up the BAM. This is already supported using the "qcom,controlled-remotely" property. However, for some reason another possible configuration is that the remote processor is responsible for powering up the BAM, but we are still responsible for initializing it (e.g. resetting it etc). Add a "qcom,powered-remotely" property to describe that configuration. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma [moved Stephan's change to the YAML dt-binding format] Signed-off-by: Stephan Gerhold --- Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml index cfff3a2286fb..bf0a59e8a2bf 100644 --- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml +++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml @@ -73,6 +73,12 @@ properties: Indicates that the bam is controlled by remote proccessor i.e. execution environment. + qcom,powered-remotely: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates that the bam is powered up by a remote processor + but must be initialized by the local processor. + qcom,num-ees: $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 From patchwork Wed Nov 10 10:59:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611857 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B655BC433EF for ; Wed, 10 Nov 2021 11:00:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9BC4A61205 for ; Wed, 10 Nov 2021 11:00:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231714AbhKJLD3 (ORCPT ); Wed, 10 Nov 2021 06:03:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231496AbhKJLDM (ORCPT ); Wed, 10 Nov 2021 06:03:12 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0E25C061A0B for ; Wed, 10 Nov 2021 03:00:17 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id t21so2674284plr.6 for ; Wed, 10 Nov 2021 03:00:17 -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=Kl/T88F25r8f4Ku0pHT3jWyyjVwCGP8jBzT3ZsV+t6c=; b=cZXAnuf5k/IaNtyS5xogwOnFGddfjeXy7FVrckHL/XkVQAltqf4O2YUBDIWecT/xgr DPOJ8G+7rhFubWhLel9+sL9/mnAEWwJXI9SkCl8ESFwNZ+dTFLHMxevhYhD4wY4MRk7q xPInEzuRdjEGLOAB9o+UqCp+4SQz41QtL8OPsbwo0cELuWwMLxd6O4gluLZek/2zcpxl FUxoThR9sNfTAZovZhQHsLQdhDTIKBgXNaE/1JRofeRdJ6q+otonl0NAqoACbJ/FtDYM h4BstBIKTc1jJUSovCOtIyDsxLKbZXQM54G4XWAqsYY/kJdhohp/ZFM3SAj+40WRaQ3S qP1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kl/T88F25r8f4Ku0pHT3jWyyjVwCGP8jBzT3ZsV+t6c=; b=r0oXCqpyqA8lzzIuNjvWyZEMqK7Y7t12jjR0HaDKnNI+xsmFbJm1avFvXlk2zKpi5i +BdS1PtdM6pHHq4fwO81phPQ5DKxqElFtPSfCJiTBaX/nbNMV0OM7DbBapzdQtwD3oVs qKYUIuSzi64zdXscqRLyCVwoCavIgp+k1xdVkjDJml44Ihx61LnpPSJPm969RzGKBSk/ fFpPwYv19uqSnRajeVZy+s5zZVAZWMlnqgkeehstaMwiJBGi3qFkABIZkXYSENDhjKhb sWRBaLFPLVXcznzg90xpjIrqcNJEj/r3IWF2ytSDQJ3Zvf0XV3PKL1iDt9uHhI+Kbi1h vUqA== X-Gm-Message-State: AOAM531zbPhWjtkGkCYjQ7rI523YJrPI/LZIMABEXL+RX6dceDMUx4KO YKOi7e6CzTEbfchAMMEgNMolmuJN34koNA== X-Google-Smtp-Source: ABdhPJxkWOikxhyUtXSLsL3VUZ6v0b0KfyIBRDafoSEW3dx1tECA+0pQKG7eR+nvHaC7OlOZqJFMdQ== X-Received: by 2002:a17:90b:1b03:: with SMTP id nu3mr15759231pjb.47.1636542017193; Wed, 10 Nov 2021 03:00:17 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:16 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson , Rob Herring Subject: [PATCH v5 07/22] dt-bindings: qcom-qce: Convert bindings to yaml Date: Wed, 10 Nov 2021 16:29:07 +0530 Message-Id: <20211110105922.217895-8-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Convert Qualcomm QCE crypto devicetree binding to YAML. Cc: Thara Gopinath Cc: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Bhupesh Sharma Reviewed-by: Bjorn Andersson --- .../devicetree/bindings/crypto/qcom-qce.txt | 25 ------- .../devicetree/bindings/crypto/qcom-qce.yaml | 67 +++++++++++++++++++ 2 files changed, 67 insertions(+), 25 deletions(-) delete mode 100644 Documentation/devicetree/bindings/crypto/qcom-qce.txt create mode 100644 Documentation/devicetree/bindings/crypto/qcom-qce.yaml diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.txt b/Documentation/devicetree/bindings/crypto/qcom-qce.txt deleted file mode 100644 index fdd53b184ba8..000000000000 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.txt +++ /dev/null @@ -1,25 +0,0 @@ -Qualcomm crypto engine driver - -Required properties: - -- compatible : should be "qcom,crypto-v5.1" -- reg : specifies base physical address and size of the registers map -- clocks : phandle to clock-controller plus clock-specifier pair -- clock-names : "iface" clocks register interface - "bus" clocks data transfer interface - "core" clocks rest of the crypto block -- dmas : DMA specifiers for tx and rx dma channels. For more see - Documentation/devicetree/bindings/dma/dma.txt -- dma-names : DMA request names should be "rx" and "tx" - -Example: - crypto@fd45a000 { - compatible = "qcom,crypto-v5.1"; - reg = <0xfd45a000 0x6000>; - clocks = <&gcc GCC_CE2_AHB_CLK>, - <&gcc GCC_CE2_AXI_CLK>, - <&gcc GCC_CE2_CLK>; - clock-names = "iface", "bus", "core"; - dmas = <&cryptobam 2>, <&cryptobam 3>; - dma-names = "rx", "tx"; - }; diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml new file mode 100644 index 000000000000..3a839c159d92 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/qcom-qce.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm crypto engine driver + +maintainers: + - Bhupesh Sharma + +description: | + This document defines the binding for the QCE crypto + controller found on Qualcomm parts. + +properties: + compatible: + const: qcom,crypto-v5.1 + + reg: + maxItems: 1 + + clocks: + items: + - description: iface clocks register interface. + - description: bus clocks data transfer interface. + - description: core clocks rest of the crypto block. + + clock-names: + items: + - const: iface + - const: bus + - const: core + + dmas: + items: + - description: DMA specifiers for rx dma channel. + - description: DMA specifiers for tx dma channel. + + dma-names: + items: + - const: rx + - const: tx + +required: + - compatible + - reg + - clocks + - clock-names + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + #include + crypto-engine@fd45a000 { + compatible = "qcom,crypto-v5.1"; + reg = <0xfd45a000 0x6000>; + clocks = <&gcc GCC_CE2_AHB_CLK>, + <&gcc GCC_CE2_AXI_CLK>, + <&gcc GCC_CE2_CLK>; + clock-names = "iface", "bus", "core"; + dmas = <&cryptobam 2>, <&cryptobam 3>; + dma-names = "rx", "tx"; + }; From patchwork Wed Nov 10 10:59:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611859 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E732C433EF for ; Wed, 10 Nov 2021 11:00:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC88E611BF for ; Wed, 10 Nov 2021 11:00:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231747AbhKJLDe (ORCPT ); Wed, 10 Nov 2021 06:03:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231750AbhKJLDR (ORCPT ); Wed, 10 Nov 2021 06:03:17 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82CC9C06127A for ; Wed, 10 Nov 2021 03:00:22 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id iq11so1259591pjb.3 for ; Wed, 10 Nov 2021 03:00:22 -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=KAyZqAMlAmUiHf1dIx2+pecIBOy9N3N7dPQhBsif/R8=; b=f0pHnEifAzmDAArN/HwII5bNPgjK419EZhSz1sjI9mvSbAYTen9l0dp90oBGPBk/BO 7hoBIr5HLj4UOUQTzY6OYvKe2h73SGzJRouL12bxGEh9hhRKRVtPnXkyGpUrnebx09GO 7/vjTmNDN7CVMWWMGKnE27lLVMbH/m03d3O7fAXSEXrCOzK31BvKSctLyFpwYAdqu8Pj dE+M6PKFKQiElWR8iCd4eEpBqg5wOexQu+zv4s3CU+JtcKrVWqxElYCT4MDaGAJlSWXg GXw5f4OMUcbCwsSAZ44b2EatbGDGDHaPff7r/Clf/gFFD94o7qosT1lNasckiZPvafil j6LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KAyZqAMlAmUiHf1dIx2+pecIBOy9N3N7dPQhBsif/R8=; b=1YAc8yBHzGDsZfBBN0vgdzOzDqV8PouFzRZo4UUWHIaB+ahL7p5pTIfVqQ/mWEYTls DLrLDXai9H40SEBuwMwB/xuyFbceDWIrR2o2vysobsn945vwV+IBbPokdiinQWsh8q7N xqIgG6KURwU8JecH2J2o/lZKUO1auwJ3qhQLUXaxogPVLti3gH9TyqcSb+Vgls0xWyvx dl73djor+HG2/3h0IeSmim5D/j3743lKqvlmDLyDN+g5Sq4EaLrhn9t1iJw8TS0MVXog b9CoBfA/CZVee7sajcZZruEDhZvX+49cYLQVNHpSC0zGah+deQkE8Sja/2NMggIZWeHm JEKA== X-Gm-Message-State: AOAM532vJACklVo6nCZu/XnVP9/CloxBpEVtayE7f3L41mqCoz9dQuaY EEIOdT51e1lc9RYklFzDv29LFXIsgJj1CQ== X-Google-Smtp-Source: ABdhPJwHqUeKDR5q61yigu2TuQjbamu1gW52Bf126KWU3sYBRESwbfSmA++ahBXu3lZKz6URwfYh3g== X-Received: by 2002:a17:90a:df01:: with SMTP id gp1mr15736659pjb.28.1636542021917; Wed, 10 Nov 2021 03:00:21 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:21 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 08/22] dt-bindings: qcom-qce: Add 'interconnects' and 'interconnect-names' Date: Wed, 10 Nov 2021 16:29:08 +0530 Message-Id: <20211110105922.217895-9-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add 'interconnects' and 'interconnect-names' as optional properties to the device-tree binding documentation for qcom crypto IP. These properties describe the interconnect path between crypto and main memory and the interconnect type respectively. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Acked-by: Rob Herring --- Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index 3a839c159d92..30deaa0fa93d 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -32,6 +32,14 @@ properties: - const: bus - const: core + interconnects: + maxItems: 1 + description: + Interconnect path between qce crypto and main memory. + + interconnect-names: + const: memory + dmas: items: - description: DMA specifiers for rx dma channel. From patchwork Wed Nov 10 10:59:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90467C433F5 for ; Wed, 10 Nov 2021 11:00:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77D3F61251 for ; Wed, 10 Nov 2021 11:00:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231788AbhKJLDi (ORCPT ); Wed, 10 Nov 2021 06:03:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbhKJLDT (ORCPT ); Wed, 10 Nov 2021 06:03:19 -0500 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 988C7C06120D for ; Wed, 10 Nov 2021 03:00:27 -0800 (PST) Received: by mail-pg1-x532.google.com with SMTP id r28so1976354pga.0 for ; Wed, 10 Nov 2021 03:00:27 -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=7Eecmho/J6Agff4bcpW3b3Dj2ZtsofOUgkrIvTWiN8c=; b=leAvj1mXLG0HHHpuqJnYx4iiChlD88CZNwcnrsMCfsebweYhh7+0cGtjUPp2+2Xg91 itLpKUAmWtnIVRMCe/7gpXX17rZJmMSk67gsHRGP+i4Md3B3cBtFZS3JOQuyYMjtmjLo sj4LpG3ZNcqvU8fawzrzltxb81kcAz0udI9Pm1TkjMzRz9fUHT8xpD2y1RiPJXELCBO5 qX9CSqiQ2zTbMtli+tWsLOnDtm4h97/2IDZqQ+LKwulNix3Km7Nf4QKedfxfzFE0Z+yg 57QDQdVlQOeG8IvYmaVYw8bSV99q6D3UZdQokfweNzCbYzHDfPoAUW85x6zTrazzixa3 h+iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7Eecmho/J6Agff4bcpW3b3Dj2ZtsofOUgkrIvTWiN8c=; b=CwX9LRJThezqPcfhcg4mBJRnA70Xor6gR0+Xo0wMJk0Ucz1Ei95xc65Sfqg6BNNDtl 3XKD/Jk+qR/NG8bNwQvd5Fuy92w8cZCbtecvUYkDuXLVld2Lg/FZLxAg1W5NZ+VWI3By WuNvah/cJ74K8Zi4VQojOZRprQLJQwPcDhYSuMrxoh7cuZ9LK2R1JjpFajmtkjrnoPtp 003vy/2laYaNfFAWnRy4l9SkQ0yF12qWk7gTR078UMxCZWegs46kNha3QQISCWkltchj /UeBel0/4Zjbr+T25d9AgXAbEeyf0npPTT7OObvFePTKqjmTjPbjZIA0MakWbKOkB47O 2lDg== X-Gm-Message-State: AOAM532lpyL8mW6tLDmb2eCUpENLDHFiD8CHrXRdperCSv6mZjoU1cNu jsScZRO/pVjHJQIsl3b0+3wjqmUZrkJJOg== X-Google-Smtp-Source: ABdhPJxviW6mvmO0Bz+ZTQMwv+gsFrpAJRqvbJUVly9WWffJckKn5XGCguRKyP28KHPeCjFmGfFF1g== X-Received: by 2002:a05:6a00:b49:b0:49f:cc01:10ff with SMTP id p9-20020a056a000b4900b0049fcc0110ffmr15448827pfo.42.1636542026926; Wed, 10 Nov 2021 03:00:26 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:26 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 09/22] dt-bindings: qcom-qce: Move 'clocks' to optional properties Date: Wed, 10 Nov 2021 16:29:09 +0530 Message-Id: <20211110105922.217895-10-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org QCom QCE block on some SoCs like ipq6018 don't require clock as the required property, so the properties 'clocks' and 'clock-names' can be moved instead in the dt-bindings to the 'optional' properties section. Otherwise, running 'make dtbs_check' leads to the following errors: dma-controller@7984000: clock-names:0: 'bam_clk' was expected arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dt.yaml dma-controller@7984000: clock-names: Additional items are not allowed ('bam_clk' was unexpected) arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dt.yaml dma-controller@7984000: clock-names: ['iface_clk', 'bam_clk'] is too long arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dt.yaml dma-controller@7984000: clocks: [[9, 138], [9, 137]] is too long arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dt.yaml Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index 30deaa0fa93d..f35bdb9ee7a8 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -53,8 +53,6 @@ properties: required: - compatible - reg - - clocks - - clock-names - dmas - dma-names From patchwork Wed Nov 10 10:59:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611863 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 636C1C433F5 for ; Wed, 10 Nov 2021 11:01:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 502B761268 for ; Wed, 10 Nov 2021 11:01:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231804AbhKJLDr (ORCPT ); Wed, 10 Nov 2021 06:03:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231709AbhKJLD3 (ORCPT ); Wed, 10 Nov 2021 06:03:29 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB781C061225 for ; Wed, 10 Nov 2021 03:00:32 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id u11so2711553plf.3 for ; Wed, 10 Nov 2021 03:00:32 -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=54tdVliIWNsHoxLvT29lfSVXNZQfROhZR/ww4Z9gmDs=; b=pBlsYdbzcAF2OMaaiRBWhvf27TxuDH/EbI7XqtEdLDgSUDDZ9tRpcMW0KRvxECHqr4 VPrD1Qz65SwFtF4R3Z+SgdCK9cMqmclKQHEKIMYWklIoh1zd3LPtJUJlaImALZcmrlAV /9j0iSVdJ0kDUmqkXO8E74beY/Xss7p6QYSyYm79Muh11SwfFPWhyrym7G/TkpKjT0vt xdyloJoryMFbILTC8ha8Mb5EeOIRTMl8ME8e737YakFzeUD6K4JGCWNY8547FIEAkG6c XEkBsk7ivGB+APV/iDPjnXiAQpmKPI/vGmoSeQreuBRSJteW+OZMlhS9yPowTzzi1vG1 WfTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=54tdVliIWNsHoxLvT29lfSVXNZQfROhZR/ww4Z9gmDs=; b=F/4ZQjaK0DRjgLna29uS2LCIyVwpjgSZveLGBB1CfVQPioqlHIVREeCepyROY3Nuy5 1O4483AMfp+ppEySCMDDh/TfijfPA0zEVuioI+sKs5U/Sj0qswsKdNM16tbTS2Q9j78S 9/tXkfE/85x/R5fzlNRT1xnlFTzUtcop70Gb/Z7NWA7g1xCS9SBjeGDcTw2gSXYtMDzT R43/JJ8siZ4POaqh5pMTwoWuU/zmAXJkLKCjd/HAlMpllbs0iKESYEQNSing6XX4DBU6 RYXbhJZTrdM5ejS5pCzdqffO17pTGYTGOkYcitb8RMWwW/MEGPJxQ7FXa0xQHULW6Jea waQQ== X-Gm-Message-State: AOAM530gXIGP5ZYFoQuMTfJV4JSSjUhrM0d/+zSeW80t757uUL5Ezc1e vLpL01bZj2XF7wB3rpGATzsr6Z7OQP/xRg== X-Google-Smtp-Source: ABdhPJx3NHUP62WpCyEovHay7pM3+NqDoM66ogl6ACc4C7Im2L9Z/Zo7FBb4lh5Wh2JLmJD0EppiwQ== X-Received: by 2002:a17:90b:38c9:: with SMTP id nn9mr15751456pjb.241.1636542032065; Wed, 10 Nov 2021 03:00:32 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:31 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson , Rob Herring Subject: [PATCH v5 10/22] dt-bindings: qcom-qce: Add 'iommus' to optional properties Date: Wed, 10 Nov 2021 16:29:10 +0530 Message-Id: <20211110105922.217895-11-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the missing optional property - 'iommus' to the device-tree binding documentation for qcom-qce crypto IP. This property describes the phandle(s) to apps_smmu node with sid mask. Cc: Thara Gopinath Cc: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Bhupesh Sharma --- .../devicetree/bindings/crypto/qcom-qce.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index f35bdb9ee7a8..efe349e66ae7 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -32,6 +32,12 @@ properties: - const: bus - const: core + iommus: + minItems: 1 + maxItems: 8 + description: | + phandle to apps_smmu node with sid mask. + interconnects: maxItems: 1 description: @@ -70,4 +76,9 @@ examples: clock-names = "iface", "bus", "core"; dmas = <&cryptobam 2>, <&cryptobam 3>; dma-names = "rx", "tx"; + iommus = <&apps_smmu 0x584 0x0011>, + <&apps_smmu 0x586 0x0011>, + <&apps_smmu 0x594 0x0011>, + <&apps_smmu 0x596 0x0011>; + }; From patchwork Wed Nov 10 10:59:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611865 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 827F5C4332F for ; Wed, 10 Nov 2021 11:01:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F5E461268 for ; Wed, 10 Nov 2021 11:01:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231840AbhKJLDz (ORCPT ); Wed, 10 Nov 2021 06:03:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231766AbhKJLDf (ORCPT ); Wed, 10 Nov 2021 06:03:35 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72F5FC06118B for ; Wed, 10 Nov 2021 03:00:38 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id gf14-20020a17090ac7ce00b001a7a2a0b5c3so1323088pjb.5 for ; Wed, 10 Nov 2021 03:00:38 -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=zpst4LNqpOQv3g4mfS4aBAHT3dcK/uR+u5lZdpUeqpY=; b=Q+hXJwnN9C+thQknUIy7UewotrRXlH6mjjYFSdXv6ykK+3QaDbtrsSKhlUgOT2lvkc zDXHI76eBRW7Gozjchfe4wYB1NA/SrmZojBwM0mr3QGItO4Z+0dK8/haW2eeYXRyV0t7 AJunsWo+9cDw5JlGf3QQ19kN4EwIed/RBwyz+E/5KlijF3X6MDZ+92T/MzANl0mmG3uw lPbKdHQTLDF8l62ZAM8oM5IFkqVlPb8bPGclYWPITYKqS0ejqaXYacz2tHTErH4uyF3Y ox2/QCpRUPtbrHGhnQ1spGfL0Qh16tL9qx9fnCiQqsTeYWXYOUEL1q1uoIpGy7qOSOlk 08og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zpst4LNqpOQv3g4mfS4aBAHT3dcK/uR+u5lZdpUeqpY=; b=aaQyKltoEZj/gWn4jCxSGzAKPkELIUauXfu18383EX9nmSfo3BhV4XAFMMki2Bcu9V VcQGBXLeKg5U7KpFpt6qUTuwLP0kvB0hqtHo+ZpPmbMw5CE9UxtZpDpmFEcX5jtFbl/w Dgyhavc16wU9CLBAkX7BBtOItAnXGMJuk3oULle1QOUJnO/HBY4XMUiV2fieuos//Aj8 1hvP3m2S4vGCt/IXOwQqg40BiMa+zLsrL9qGqoCmo8YXRGLa2UfDqW77yUQ43JnvL85T oC17Wo3OiChmay+XoxYWhT4DtzyuSEcRvkCr+H/fH0vMCVkDSr3F3kfIgDbmSu9Q+reN 9StQ== X-Gm-Message-State: AOAM532mMwrVQEBYcuEmbLIL8doY+0hURlKNbYk3wcFZZx66SPcDaZhY NSAYB5qgQ/d9QeM/EnNQZyojJUAAaAYIVw== X-Google-Smtp-Source: ABdhPJxIalNrxJYWD+oPN0ufYN8oyRBeLMKqAWl14iEJmuvXtt2j/L9VDcfw4CY1utoWLh2EnQePog== X-Received: by 2002:a17:90b:4a47:: with SMTP id lb7mr15816864pjb.243.1636542037675; Wed, 10 Nov 2021 03:00:37 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:37 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson , Rob Herring Subject: [PATCH v5 11/22] dt-bindings: crypto : Add new compatible strings for qcom-qce Date: Wed, 10 Nov 2021 16:29:11 +0530 Message-Id: <20211110105922.217895-12-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Newer qcom chips support newer versions of the qce crypto IP, so add soc specific compatible strings for qcom-qce instead of using crypto IP version specific ones. Keep the old strings for backward-compatibility, but mark them as deprecated. Cc: Thara Gopinath Cc: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Bhupesh Sharma --- Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index efe349e66ae7..77b9f544f32f 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -15,7 +15,13 @@ description: | properties: compatible: - const: qcom,crypto-v5.1 + enum: + - qcom,crypto-v5.1 # Deprecated. Kept only for backward compatibility + - qcom,ipq6018-qce + - qcom,sdm845-qce + - qcom,sm8150-qce + - qcom,sm8250-qce + - qcom,sm8350-qce reg: maxItems: 1 @@ -68,7 +74,7 @@ examples: - | #include crypto-engine@fd45a000 { - compatible = "qcom,crypto-v5.1"; + compatible = "qcom,ipq6018-qce"; reg = <0xfd45a000 0x6000>; clocks = <&gcc GCC_CE2_AHB_CLK>, <&gcc GCC_CE2_AXI_CLK>, From patchwork Wed Nov 10 10:59:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611867 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2707FC433FE for ; Wed, 10 Nov 2021 11:01:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A54661260 for ; Wed, 10 Nov 2021 11:01:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231666AbhKJLEF (ORCPT ); Wed, 10 Nov 2021 06:04:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231799AbhKJLDr (ORCPT ); Wed, 10 Nov 2021 06:03:47 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61C4CC061767 for ; Wed, 10 Nov 2021 03:00:43 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id t5-20020a17090a4e4500b001a0a284fcc2so1527142pjl.2 for ; Wed, 10 Nov 2021 03:00:43 -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=pbwxx26uDNHirCinQNPTtkR73Falpq6kV84mw3b4gxU=; b=CiBhkcMOkMYi3No6OK/yH20y8kyu27LK4Ih7rmhd657Sa0Dfp7lv1T9XO+wQxYk2s1 HTDtlRGuvb4dR8jPsNqMiuCNQt4hZidfWUZT8Yfs47T0jZ+M1Mk+AK0SsWNV1OhxU2+4 olIVs+kkWgORbpcI8/NtYUtPgugb79UD0HMCKxg4Qbbxgvg/LbxGtiP8Pfx2cMi32AS1 0/TozZdkF+aYkIUtf+TEbaJzC6ZbzeoWCo9GAYCtcbyRQKqmW1VCLzqONwjLqVI7oOnk /mC3xM7dwa33rdplml64ouhLUujDZqRyDZ5OFgL29m/ctb6L2P3fVa0AN+0d2t+oKvkJ 6afA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pbwxx26uDNHirCinQNPTtkR73Falpq6kV84mw3b4gxU=; b=wPM3YwYD4g9ZDdoyBTFS2WzdD1THtoJG0ww8MdW6KuwATB4mdmBY8X4YN8TLFjO5Bp Cb7CCGVcm7B9G9lwUfRGkWlHyfRMJym+n5L/vy2JZFNfG7VbyMrOop0jrxCwtA/OJpL9 bfD+wsFaxhPRVsWeJ9w0/KTTZ+RqQryJFT/GDJesaFaBEtMWH2pq6DWLKfw1VqlabBKE HARzgp4KnBfML6vIsoSawtyLBunii45mpn8x/XZGxUfRgUmA0sqoWdM8U9tB61ZeR32m o4cbZldwcfpe3JPsWZ38zNlaGhr9N3+vXijF9KWinHxrazaSM71J6lrtXHcoxTPlxHid gZ/g== X-Gm-Message-State: AOAM533Oh8GGX0CBZWy9qu4FT7FnvTQPtEVU2WCr3hqcMfKdwBPuDa1+ hFD/mX1DF3LgwhqYK2DvgzPrU/FUlVPxPw== X-Google-Smtp-Source: ABdhPJx4fMgUFVQjw1MR6UEwOKaZ33xFJl3hfs2RwNICZF+dUyxrI5MshS62cr+NF5LOrPy31w92dQ== X-Received: by 2002:a17:902:f2c2:b0:141:9ce8:930f with SMTP id h2-20020a170902f2c200b001419ce8930fmr14718759plc.68.1636542042702; Wed, 10 Nov 2021 03:00:42 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:42 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 12/22] arm64/dts: qcom: Use new compatibles for crypto nodes Date: Wed, 10 Nov 2021 16:29:12 +0530 Message-Id: <20211110105922.217895-13-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since we are using soc specific qce crypto IP compatibles in the bindings now, use the same in the device tree files which include the crypto nodes. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index 933b56103a46..f477d026c949 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -204,7 +204,7 @@ cryptobam: dma-controller@704000 { }; crypto: crypto@73a000 { - compatible = "qcom,crypto-v5.1"; + compatible = "qcom,ipq6018-qce"; reg = <0x0 0x0073a000 0x0 0x6000>; clocks = <&gcc GCC_CRYPTO_AHB_CLK>, <&gcc GCC_CRYPTO_AXI_CLK>, diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 526087586ba4..8e7cbadff25a 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2329,7 +2329,7 @@ cryptobam: dma-controller@1dc4000 { }; crypto: crypto@1dfa000 { - compatible = "qcom,crypto-v5.4"; + compatible = "qcom,sdm845-qce"; reg = <0 0x01dfa000 0 0x6000>; clocks = <&gcc GCC_CE1_AHB_CLK>, <&gcc GCC_CE1_AXI_CLK>, From patchwork Wed Nov 10 10:59:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611869 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65D77C433FE for ; Wed, 10 Nov 2021 11:01:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 514CC61268 for ; Wed, 10 Nov 2021 11:01:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231823AbhKJLES (ORCPT ); Wed, 10 Nov 2021 06:04:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231846AbhKJLD4 (ORCPT ); Wed, 10 Nov 2021 06:03:56 -0500 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73BF7C06120B for ; Wed, 10 Nov 2021 03:00:48 -0800 (PST) Received: by mail-pg1-x52c.google.com with SMTP id 188so1922985pgb.7 for ; Wed, 10 Nov 2021 03:00:48 -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=7u1iAVVo3sdaS9s0AUgUQ2tek6Zg53845o3/r2uXRg0=; b=hvbiT8f/eEt8WmEsuwwBjOJgtVnQvv07DOAjeW0ncH+fPSV87cYZQVt8VaAKrEViQh ObEzIyHC8FUjk4/wzX3zSm4gOhqNBfZ9fgXWfgIFdw4MrqIV6yzc9pPWod8oYtPixleJ D6qXX74e5V9b9TvC7PNuxv+GgrF4NsOiS37KNgovc8OcSPnm1LQaraYXqgZB96UYaxbb s6Ybl/NTwqXGILqK+lFolaNAqTB6j65l6QP3GlbI/GBnux/B8sgRQwz6yBCFstnJUWS4 Jx3sv6HF347TtXNTGbSZlq/Y7/LwKHvddkqJrzghTnqIIET9e2VIn2cIJ3FjUKC2YI1A ph6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7u1iAVVo3sdaS9s0AUgUQ2tek6Zg53845o3/r2uXRg0=; b=YrvqKtoGx/HMcuz22OgMTIGkNPIR5wBLWEmX3i/jpWaJ43JTLeQiyxUNR/zkYbVYNL lvR8/tA6440CuiOfBPeTLVD2ONELaLV9L4BVH44hnwYtpyrtVfH5Q8VnHjPGJ5ECz29b 6+Gx94lJc0TAifZvrpJsPoKFgZbR7eHYIR9jlx0PNYzsYWj9DzOueKSPkPmf8q5jb4IX dZa7GER4J3GsBBiS4g/Rf7grvaSCXEQ+P9XRTbDbtgvcMYRDa6dogJoayc5VFuy7h7xZ 6vAnwvlDarBdfthoAn/wxf89+jvfvrV85A8mqFA/5WWre/oRT4HTWX9J7sEFNhY57b1k LrFQ== X-Gm-Message-State: AOAM532kB/ly1BMrVZ0jGbw7hJ1CfRtRVlUO+jQhD8T5Nb7KA+kQnVAq xPzGp14ZAz6dXHCY52LvI9zWi/auYT4lnA== X-Google-Smtp-Source: ABdhPJwak4cjDAI1k2lQt8ssRLnbvLhAzjfJGkZNZix769SZnH+yESXTNPDQWGJhiU5YpqBa4MRzCg== X-Received: by 2002:a05:6a00:1d26:b0:49f:b599:4c02 with SMTP id a38-20020a056a001d2600b0049fb5994c02mr15365919pfx.67.1636542047698; Wed, 10 Nov 2021 03:00:47 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:47 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 13/22] dma: qcom: bam_dma: Add support to initialize interconnect path Date: Wed, 10 Nov 2021 16:29:13 +0530 Message-Id: <20211110105922.217895-14-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Thara Gopinath BAM dma engine associated with certain hardware blocks could require relevant interconnect pieces be initialized prior to the dma engine initialization. For e.g. crypto bam dma engine on sm8250. Such requirement is passed on to the bam dma driver from dt via the "interconnects" property. Add support in bam_dma driver to check whether the interconnect path is accessible/enabled prior to attempting driver intializations. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma [Make header file inclusion alphabetical and use 'devm_of_icc_get()'] Signed-off-by: Thara Gopinath --- drivers/dma/qcom/bam_dma.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index c8a77b428b52..19fb17db467f 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -392,6 +393,7 @@ struct bam_device { const struct reg_offset_data *layout; struct clk *bamclk; + struct icc_path *mem_path; int irq; /* dma start transaction tasklet */ @@ -1284,6 +1286,15 @@ static int bam_dma_probe(struct platform_device *pdev) return ret; } + /* Ensure that interconnects are initialized */ + bdev->mem_path = devm_of_icc_get(bdev->dev, "memory"); + + if (IS_ERR(bdev->mem_path)) { + ret = PTR_ERR(bdev->mem_path); + dev_err(bdev->dev, "failed to acquire icc path %d\n", ret); + goto err_disable_clk; + } + ret = bam_init(bdev); if (ret) goto err_disable_clk; From patchwork Wed Nov 10 10:59:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611871 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 621BCC4332F for ; Wed, 10 Nov 2021 11:01:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DBBF611BF for ; Wed, 10 Nov 2021 11:01:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231767AbhKJLEZ (ORCPT ); Wed, 10 Nov 2021 06:04:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231664AbhKJLEF (ORCPT ); Wed, 10 Nov 2021 06:04:05 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28832C061210 for ; Wed, 10 Nov 2021 03:00:53 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id c4so2353190pfj.2 for ; Wed, 10 Nov 2021 03:00:53 -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=eHy9V66S/pA7pn8cr8IGIeTU+8YjPwSVmNZC5BhYoHI=; b=WQG1s1s8cOph5ZyoSZ+As27S7z1Mb0vQYxo5+bSM8b7qahCCsIyh+Wm4N9lGscmbaV ZjwJBjxmrsVJEF605MX3dJekG4y6yige39vqbzwRcU4LxBHV+gMii1RKNDbYLYS7xzIU dujSsJebAhIVMFDK2fEZ2e1/khAhMcrg8kXz+v6j5ANPdXwkOWW2WNrxJKeJwiQ7YN7u qig0Ff7HsE5QV4pvkYdK+p7o46uqKcSoMNr2kpMpUz1QxLFt1uABLSAwOpz0H2Q5rGVs T8fo/k7FBdapbxrGtap6QVgEwRHuKlKyYGdjKMV/Qm3MHbZGb/lNzZbQBYTACoXofNzZ y4xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eHy9V66S/pA7pn8cr8IGIeTU+8YjPwSVmNZC5BhYoHI=; b=au1lYEuLO5qyURGlW6kmJerUG++CI9sVTpiVD1dQFdrZfOu/ljULEu5tlZVb5gGfuR liTyipNyFpAFs6qmF965ZmTgHDV9q7gcJoF1fWKskOZ5eCIiUGXet02VDVzn4QKOj8U4 FDsvmsvwkyy4IdC88my4cVeKLe++5q2Z3/zfcB7dZHkH2PelRzHeoe8TR9MqrtBvnkcD xPj4NEP9gxOKVNy0TE0gtu8T6hi7wJvT4YNm4o0uGpgrHpFVAhuhd/m45YHW9Sb84GPV wIHUAGPhrWBDYMiUUydVCaBbJNwht9w4hOye5RDpK1+0tHQKwibFYHUTeScpwmzJnG5d xnRg== X-Gm-Message-State: AOAM531jsxKq35/5e0nkGlkGxWpWAEqsenVY43Oz6sZtk41uLv0WiTFh BQf1pozg43YCS5+nOkx3GxcxyztQWLbJBw== X-Google-Smtp-Source: ABdhPJxgcJaeDFpzozA/We6k9UKxS2oED4M6Cq5Bqm6Zo+B/7/didqXSMVl0cv4t44fqgdFfM1uaMA== X-Received: by 2002:a05:6a00:1944:b0:438:d002:6e35 with SMTP id s4-20020a056a00194400b00438d0026e35mr98550246pfk.20.1636542052446; Wed, 10 Nov 2021 03:00:52 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:52 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 14/22] crypto: qce: core: Add support to initialize interconnect path Date: Wed, 10 Nov 2021 16:29:14 +0530 Message-Id: <20211110105922.217895-15-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Thara Gopinath Crypto engine on certain Snapdragon processors like sm8150, sm8250, sm8350 etc. requires interconnect path between the engine and memory to be explicitly enabled and bandwidth set prior to any operations. Add support in the qce core to enable the interconnect path appropriately. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma [Make header file inclusion alphabetical and use devm_of_icc_get()] Signed-off-by: Thara Gopinath --- drivers/crypto/qce/core.c | 34 +++++++++++++++++++++++++++------- drivers/crypto/qce/core.h | 1 + 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index d3780be44a76..89d9c01ba009 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -22,6 +23,8 @@ #define QCE_MAJOR_VERSION5 0x05 #define QCE_QUEUE_LENGTH 1 +#define QCE_DEFAULT_MEM_BANDWIDTH 393600 + static const struct qce_algo_ops *qce_ops[] = { #ifdef CONFIG_CRYPTO_DEV_QCE_SKCIPHER &skcipher_ops, @@ -206,21 +209,35 @@ static int qce_crypto_probe(struct platform_device *pdev) if (ret < 0) return ret; + qce->mem_path = devm_of_icc_get(qce->dev, "memory"); + if (IS_ERR(qce->mem_path)) + return PTR_ERR(qce->mem_path); + qce->core = devm_clk_get(qce->dev, "core"); - if (IS_ERR(qce->core)) - return PTR_ERR(qce->core); + if (IS_ERR(qce->core)) { + ret = PTR_ERR(qce->core); + goto err; + } qce->iface = devm_clk_get(qce->dev, "iface"); - if (IS_ERR(qce->iface)) - return PTR_ERR(qce->iface); + if (IS_ERR(qce->iface)) { + ret = PTR_ERR(qce->iface); + goto err; + } qce->bus = devm_clk_get(qce->dev, "bus"); - if (IS_ERR(qce->bus)) - return PTR_ERR(qce->bus); + if (IS_ERR(qce->bus)) { + ret = PTR_ERR(qce->bus); + goto err; + } + + ret = icc_set_bw(qce->mem_path, QCE_DEFAULT_MEM_BANDWIDTH, QCE_DEFAULT_MEM_BANDWIDTH); + if (ret) + goto err; ret = clk_prepare_enable(qce->core); if (ret) - return ret; + goto err_mem_path_disable; ret = clk_prepare_enable(qce->iface); if (ret) @@ -260,6 +277,9 @@ static int qce_crypto_probe(struct platform_device *pdev) clk_disable_unprepare(qce->iface); err_clks_core: clk_disable_unprepare(qce->core); +err_mem_path_disable: + icc_set_bw(qce->mem_path, 0, 0); +err: return ret; } diff --git a/drivers/crypto/qce/core.h b/drivers/crypto/qce/core.h index 085774cdf641..228fcd69ec51 100644 --- a/drivers/crypto/qce/core.h +++ b/drivers/crypto/qce/core.h @@ -35,6 +35,7 @@ struct qce_device { void __iomem *base; struct device *dev; struct clk *core, *iface, *bus; + struct icc_path *mem_path; struct qce_dma_data dma; int burst_size; unsigned int pipe_pair_id; From patchwork Wed Nov 10 10:59:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611873 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D316C433EF for ; Wed, 10 Nov 2021 11:01:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA1B8611BF for ; Wed, 10 Nov 2021 11:01:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231829AbhKJLEm (ORCPT ); Wed, 10 Nov 2021 06:04:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231612AbhKJLEX (ORCPT ); Wed, 10 Nov 2021 06:04:23 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 548D8C0432C2 for ; Wed, 10 Nov 2021 03:00:58 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id t5-20020a17090a4e4500b001a0a284fcc2so1527724pjl.2 for ; Wed, 10 Nov 2021 03:00:58 -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=lLtW749UnPe8jWQgBOfGf+QUHkMztbxEo2aPck0k24g=; b=vpIOVzQeIzghGE7J3rYVia2sr88yR3iRc2AGjdxEhk0bXR8F4D/fmI0Eh7JeWdG+Nu S8hLBxRGKEt7Ob4Me9aHmlWg5ZHl2pkArYUijvZEaSwXdOtjn2HBZyI26XEmqeBz1xhq PGC/x4KO94A+zWlnJ+vb8gYKm6xOb9rBT1baIkUxEW7tCqe6JKwZXdGHRe/mxAYhayoR 2aej04aWygudAhQ9k5ElUkMtg1z9jWgWCCYTQ34YnrOpug/gfqFPJiYdfOb+FeEL7GVg P8zVgvvXfdalsnREtTQ4nmtrLSuzG3dX/8bM2p1EonmTmXmSJr9scRzxSnT5bEaOfdeg wObw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lLtW749UnPe8jWQgBOfGf+QUHkMztbxEo2aPck0k24g=; b=7yRSq2lZaYlMrOx4hmiYfEQ2tEzNOfuf+J33oY2zDCs3Mmjjq+/tJL0mKGwjdsIe+O 5t/1xaJISPChJPzvhi60ytSV16BhLK9iUBAUYnW/TPIdSRwSJEPUrMsTQdjOd+ZjBbzP kkA6aLf8cAxby4FCQHCrTBnDejNlchCmokHjuM6QVqIyKBU+SQyrZiUrOXr373YLDCCB rY/WvKHuqogKpigcsId1Ft1w8jQ00WSq+l0V3ftjQZgw7Sv/6qtPBFtYVdt2S3OuZFza Z/ayRMkKimyJ450uaakQuj2oE579+YHr/IrvZ4/QH4nftiKQY5TVo72yLMt1dD8ElJlR nsTg== X-Gm-Message-State: AOAM531vJqr1xhQTYglA7e3tA157fRXvpSUZjVU74dyVjaTcMpso/K+r Ml4t2uT3VPLEIYt4ya6M+BcmrbWtXjEJqQ== X-Google-Smtp-Source: ABdhPJwh0Tzmi+5nyx2iM9XRIK65GSIjFf2+5/qMqtdl5e1N7qd8E19Oi6DqExoVLC4VmQfNdFAhRw== X-Received: by 2002:a17:90a:e7d0:: with SMTP id kb16mr15567760pjb.22.1636542057729; Wed, 10 Nov 2021 03:00:57 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:00:57 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 15/22] crypto: qce: Add new compatibles for qce crypto driver Date: Wed, 10 Nov 2021 16:29:15 +0530 Message-Id: <20211110105922.217895-16-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since we decided to use soc specific compatibles for describing the qce crypto IP nodes in the device-trees, adapt the driver now to handle the same. Keep the old deprecated compatible strings still in the driver, to ensure backward compatibility. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- drivers/crypto/qce/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 89d9c01ba009..dd2604f5ce6a 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -297,8 +297,12 @@ static int qce_crypto_remove(struct platform_device *pdev) } static const struct of_device_id qce_crypto_of_match[] = { + /* Following two entries are deprecated (kept only for backward compatibility) */ { .compatible = "qcom,crypto-v5.1", }, { .compatible = "qcom,crypto-v5.4", }, + /* Add compatible strings as per updated dt-bindings, here: */ + { .compatible = "qcom,ipq6018-qce", }, + { .compatible = "qcom,sdm845-qce", }, {} }; MODULE_DEVICE_TABLE(of, qce_crypto_of_match); From patchwork Wed Nov 10 10:59:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F647C433F5 for ; Wed, 10 Nov 2021 11:02:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CC23611BF for ; Wed, 10 Nov 2021 11:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231635AbhKJLEr (ORCPT ); Wed, 10 Nov 2021 06:04:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbhKJLEe (ORCPT ); Wed, 10 Nov 2021 06:04:34 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65C9AC061229 for ; Wed, 10 Nov 2021 03:01:03 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id m26so2344632pff.3 for ; Wed, 10 Nov 2021 03:01:03 -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=Zajz8wlcJ/lmsrGc+Bku0OSeAwVpyzSmtcytIJmQ1Lo=; b=Rl/9j+gVyJ49tf3n/+dMojXFkhnC4v0DXwaB0ozTMpSH5XBLHxac76ivFTKmJcCUpV 1xZwL16K7gNbIyx+N4e5tENrdu7WD5dxr9/qwfBpb+1Re9eELaTp1/C38ey1rd+Fzz/3 7867dycwCsInKyRM/qdCzVGXzutOmDbeTUcRRSN/PlIvVcYCji0ysxMHfA3ETYgMWA3K RlynN0vw17HB/udoO2JslImMWG0HqHeTogLiFXeAzxjZkHHs1HdlVzzDk12WI3NHbRHy umsRGwdv9vDNh4pHdovg4Ehi0Zshyx4VuLOEmAUWN6IfnXloLgaunpPol5SrR81DtOPn aGtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zajz8wlcJ/lmsrGc+Bku0OSeAwVpyzSmtcytIJmQ1Lo=; b=bKXCUGxmg491Z/XX8WT+5cMn5LahnF6kSJ0txUJ9CFug8E3mqvtTU4DRy4jV7fVtKe 4qosl++38GB849/k6HAxyMe+B/l7UEYTWL03QplCXNQ4lOo/d5dx2YeFqznBh/4UQhzO kBsg5l7a9TYxc6syPIC/S5C5opL5SLz6AUeacvPvqBK7LNdK+u6K2vSJ/2U7Rb/RG7hO 2MndkC2BZFlxlBhPhOlGWXIkki+HFfESdpFCMTmJ96hNQaj43rUoydgnLRFs0JiC91GK TZRwyufWs5l9YnIfOlgWvX+kmSfT8ZLid653coVFsRsyz5Ncp+P/123nCsaQXFM+6eQY c2Eg== X-Gm-Message-State: AOAM530xGFyULTsPMHF2oRrinYrQ11a2eE2LP2m+bbqy4bVH45NpdaTH gswBg8Z8PNZy/F8mycmxg7rePx33U/A2DA== X-Google-Smtp-Source: ABdhPJwd7pZZQElvm6V1On9VHWVR8qHrrG6qVljBZ0zfBJeLZ4TAJLio9NR5kWfoi/eDpB8ctO6cIg== X-Received: by 2002:a63:8bc3:: with SMTP id j186mr10954336pge.250.1636542062715; Wed, 10 Nov 2021 03:01:02 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:01:02 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 16/22] crypto: qce: core: Make clocks optional Date: Wed, 10 Nov 2021 16:29:16 +0530 Message-Id: <20211110105922.217895-17-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Thara Gopinath On certain Snapdragon processors, the crypto engine clocks are enabled by default by security firmware and the driver need not/ should not handle the clocks. Make acquiring of all the clocks optional in crypto engine driver so that the driver initializes properly even if no clocks are specified in the dt. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma [Massage the commit log] Signed-off-by: Thara Gopinath --- drivers/crypto/qce/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index dd2604f5ce6a..98784d63d78c 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -213,19 +213,19 @@ static int qce_crypto_probe(struct platform_device *pdev) if (IS_ERR(qce->mem_path)) return PTR_ERR(qce->mem_path); - qce->core = devm_clk_get(qce->dev, "core"); + qce->core = devm_clk_get_optional(qce->dev, "core"); if (IS_ERR(qce->core)) { ret = PTR_ERR(qce->core); goto err; } - qce->iface = devm_clk_get(qce->dev, "iface"); + qce->iface = devm_clk_get_optional(qce->dev, "iface"); if (IS_ERR(qce->iface)) { ret = PTR_ERR(qce->iface); goto err; } - qce->bus = devm_clk_get(qce->dev, "bus"); + qce->bus = devm_clk_get_optional(qce->dev, "bus"); if (IS_ERR(qce->bus)) { ret = PTR_ERR(qce->bus); goto err; From patchwork Wed Nov 10 10:59:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74DE9C433F5 for ; Wed, 10 Nov 2021 11:02:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E95E611BF for ; Wed, 10 Nov 2021 11:02:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231598AbhKJLE6 (ORCPT ); Wed, 10 Nov 2021 06:04:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231557AbhKJLEm (ORCPT ); Wed, 10 Nov 2021 06:04:42 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B85C3C061239 for ; Wed, 10 Nov 2021 03:01:08 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id y14-20020a17090a2b4e00b001a5824f4918so1507137pjc.4 for ; Wed, 10 Nov 2021 03:01:08 -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=pEmrGhMt5x9KzAGjex8hd2BnItJeKAQ0mSWNoFozY7Y=; b=hTM4hCpWUUSnZxEfUppK6dcKEnhxFuEnHZOfw4MtmSuRm9Cvxcgzwo9oTX4COdaodE T1GmDKU4P+ibQCSbh+9cZWhShhbtMqNaanJDOucbTSWXvEPftv/zAaYwi1BvBEiQwWdA USSUTxc3c3ySXfDDC6AhSy1CE3B2dVdlwzeC9V30WaGEC0en7dss290s7SwtbN14XUwO 0TaFj2mB+EBYANm3UwUWy2xRWZk2gtLr3Z8tclCeJvmrXoz2bnRfhbj/3krWuojf8j06 RbGdaUX4jFb9d+Ep6aVR6YukPGS6hAOvKXLQ5Oop4FrWCHC6A3/dW1f94O0gJGDtJ1Xc PRsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pEmrGhMt5x9KzAGjex8hd2BnItJeKAQ0mSWNoFozY7Y=; b=2zaIpGwLL7TmqqAMt5xkRBSLEbzIWQVdTESSz4DPkgGOiGrZ+kj7djRW1pyC8/YsEh BRvH7Y2na+vwPPTO6g4LmpWZWI4mFb6lBmFDb8nVRFnbmOaxPOsN8n/iDsJbXCU/2AoK 73tjC2ne7tb1sAfcRe1osUAWQX2YRAtMKYYkwFpOAO4z3pdmC3rogLFDIHVoTfd+zNeY QrXSh7988SaPDg3e11SsQElBanLxWld+kL2PfWUFeDsskEKfJOEKSZ4s59T3i8a936Ox dXdJJcABnUt3NvTGLVknKfIG8DXbp0ezkyRTq16Y/tyxVZlMDoHaDDcImxJjZymXpriS 2+aA== X-Gm-Message-State: AOAM533eo1EH2UUlKshUUavZPOyejKDXNWOqKCMftcXFtIODKJxLIRKA GTdl9BdLERa4c539l/8MCRpzgc36aFNAjg== X-Google-Smtp-Source: ABdhPJyWq5dZS0dYnEesfHptwZiGNCpxGMUNYO5DOYrhNDof2xAUJhafmenwSdNzwnFox6ZcHapjeA== X-Received: by 2002:a17:90a:df01:: with SMTP id gp1mr15743014pjb.28.1636542067732; Wed, 10 Nov 2021 03:01:07 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.01.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:01:07 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Bjorn Andersson , Thara Gopinath Subject: [PATCH v5 17/22] crypto: qce: Print a failure msg in case probe() fails Date: Wed, 10 Nov 2021 16:29:17 +0530 Message-Id: <20211110105922.217895-18-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Print a failure message (dev_err) in case the qcom qce crypto driver probe() fails. Cc: Bjorn Andersson Cc: Rob Herring Reviewed-by: Thara Gopinath Signed-off-by: Bhupesh Sharma --- drivers/crypto/qce/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 98784d63d78c..7c90401a2ef1 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -280,6 +280,7 @@ static int qce_crypto_probe(struct platform_device *pdev) err_mem_path_disable: icc_set_bw(qce->mem_path, 0, 0); err: + dev_err(dev, "%s failed : %d\n", __func__, ret); return ret; } From patchwork Wed Nov 10 10:59:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2A44C433EF for ; Wed, 10 Nov 2021 11:02:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B113A61241 for ; Wed, 10 Nov 2021 11:02:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231920AbhKJLFC (ORCPT ); Wed, 10 Nov 2021 06:05:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231388AbhKJLEq (ORCPT ); Wed, 10 Nov 2021 06:04:46 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7B58C0432CA for ; Wed, 10 Nov 2021 03:01:13 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id h24so1259194pjq.2 for ; Wed, 10 Nov 2021 03:01:13 -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=N7nMRp9K3y3UZwNqofxhv2+ZZFxd1DDucS0wUlFgYS8=; b=K3TmuU8w+3UfeoVanD0qOBYjlUnLrBJI+f9QHBYZAYL96KA9SXyL6Uk2GDkjm8Hzw1 gzmyjKB1ZXGN4bWpdn5wiy1Wn3WiEafxZxIih5q9TlVjSxkSMNJ9AwD+ScV7XhDaTkQY dVQ9wMEVdf356sps6aEZNvo1q3SqDmgXsLye40CK5nf72NwLxCIlMFTIvqNCcxBlT23K oXzVquoF1CacKwpifWAy9M/gJ7rOhkGb5uuyc4V/i21DvWtWQdQ8nfmb9mISkxgXmYM2 1t26Cw2+/p2KgwOycS/dImz4OyVRgqnZzAB6QADSS4TI+ilF3wZn1u4E8Ze0UZ16yx+m 5NuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=N7nMRp9K3y3UZwNqofxhv2+ZZFxd1DDucS0wUlFgYS8=; b=qaYqL/AjwJony18c5L7Uz3tyNf84NgmChD7d6PYRzivel0paCLU2PiqBg+eCl7PXqk GxxTvGbyVvExBum2huOxbbbrxpizQdVH09W8DLRAHYegD9S3tYOYrfVclOal+P3YDQxK +OnWpdU0Gf0Mz3doNj03HDtJSQ/sNFKRX8oLzDJ1/Xkdx7Xk9Os72hfx/E3R0fJPsw9m LwyOxtm4M8gjdiIuVl/h3mI/P1xy0o0ogoRuHcx4vIJZooVyTkPbkWK6p0Dm3E/48sZy 1fJJaaFZ5nggSGIkcInfUQb/D8mvj2Jke5/W7HqUUgoa8apaqfQdjih+5rPdjAk3lWoQ OU0w== X-Gm-Message-State: AOAM5312chcG6RZpT40bsW4OTzVpbkZhsuepwuncOqiuthLYdSVqkblI bmHmbOhgTsWzPmmTqWK146vZ5u9yZZk1rA== X-Google-Smtp-Source: ABdhPJwB5NWUFd4M6g9qzXY/zMSMJ/f7VX/BCno86JEe0y7MaJV9eJvgJSrFyTFnYsx+Tzvu0rkUBg== X-Received: by 2002:a17:902:8d85:b0:142:892d:bfa with SMTP id v5-20020a1709028d8500b00142892d0bfamr14511987plo.76.1636542072786; Wed, 10 Nov 2021 03:01:12 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:01:12 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 18/22] crypto: qce: Defer probing if BAM dma channel is not yet initialized Date: Wed, 10 Nov 2021 16:29:18 +0530 Message-Id: <20211110105922.217895-19-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since the Qualcomm qce crypto driver needs the BAM dma driver to be setup first (to allow crypto operations), it makes sense to defer the qce crypto driver probing in case the BAM dma driver is not yet probed. Move the code leg requesting dma channels earlier in the probe() flow. This fixes the qce probe failure issues when both qce and BMA dma are compiled as static part of the kernel. Cc: Thara Gopinath Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma --- drivers/crypto/qce/core.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 7c90401a2ef1..84ed9e253d5d 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -209,9 +209,19 @@ static int qce_crypto_probe(struct platform_device *pdev) if (ret < 0) return ret; + /* qce driver requires BAM dma driver to be setup first. + * In case the dma channel are not set yet, this check + * helps use to return -EPROBE_DEFER earlier. + */ + ret = qce_dma_request(qce->dev, &qce->dma); + if (ret) + return ret; + qce->mem_path = devm_of_icc_get(qce->dev, "memory"); - if (IS_ERR(qce->mem_path)) - return PTR_ERR(qce->mem_path); + if (IS_ERR(qce->mem_path)) { + ret = PTR_ERR(qce->mem_path); + goto err; + } qce->core = devm_clk_get_optional(qce->dev, "core"); if (IS_ERR(qce->core)) { @@ -247,10 +257,6 @@ static int qce_crypto_probe(struct platform_device *pdev) if (ret) goto err_clks_iface; - ret = qce_dma_request(qce->dev, &qce->dma); - if (ret) - goto err_clks; - ret = qce_check_version(qce); if (ret) goto err_clks; @@ -265,12 +271,10 @@ static int qce_crypto_probe(struct platform_device *pdev) ret = qce_register_algs(qce); if (ret) - goto err_dma; + goto err_clks; return 0; -err_dma: - qce_dma_release(&qce->dma); err_clks: clk_disable_unprepare(qce->bus); err_clks_iface: @@ -280,6 +284,7 @@ static int qce_crypto_probe(struct platform_device *pdev) err_mem_path_disable: icc_set_bw(qce->mem_path, 0, 0); err: + qce_dma_release(&qce->dma); dev_err(dev, "%s failed : %d\n", __func__, ret); return ret; } From patchwork Wed Nov 10 10:59:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57A7BC433FE for ; Wed, 10 Nov 2021 11:02:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4412361207 for ; Wed, 10 Nov 2021 11:02:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231687AbhKJLFG (ORCPT ); Wed, 10 Nov 2021 06:05:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231879AbhKJLEu (ORCPT ); Wed, 10 Nov 2021 06:04:50 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92A26C079781 for ; Wed, 10 Nov 2021 03:01:18 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id j6-20020a17090a588600b001a78a5ce46aso1484758pji.0 for ; Wed, 10 Nov 2021 03:01:18 -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=q9azdKo5F+J5uwMC2ixM7Nsm7TiPQrz8paNWTMvpMYA=; b=oNmlJcKTe+eh2ZMyJqUZSrBrxw3liLRa0hprYwa+Cm2Ozm2SklXmhxnFotZsVrY62P +NL2+fMEpyfJ7bf5n5WaKlhIl1RauVCwadSI6Gi0pWSSnIItlBz6tb9/l4XEIet2J8ph fAfLWuJKmLENDHZ/hJVxKkvNveTAZdiyRe68Qj7H0LXCs+ZTYqdb4gkCr1YANkLk8Ysq PTOnuzQ+sgfMQbr1bFUpWx56ZJ0gQ2tSvCgU0jDXjty6E81wt5TqMBuAi/o+UQLPb9TF U16W/c9jnyM/sXRwIfMkh2KbpK13lwIL+H4GtAgs58Rm9lL7YmsFIPy4Uz6mAJOXZyKp FV5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q9azdKo5F+J5uwMC2ixM7Nsm7TiPQrz8paNWTMvpMYA=; b=hcAvnhaOSz27IJLybnqj/BywjPVskGBFVXZzloiumnj9JquG9t49yA7KMbWM72qyXK hSyIXEN7apZkEDJ1z3jcG3A39XjZKq9JjfIMpU5UABKzcEHS2TDKuhMrKk8Yd++5duO8 Vqsrpv8eT4A9veAV0+ae7KrEleDfR9WKt3trRca3oZpuKqT4Drc/OrmFszu5kFz7VlBZ HTe9P90jlkt/67qTKCUcWC2WnUg7vbEuFiU5o3rxglj8Xu+M6wkHkNvSj/PMdCHeMXYd CAl4jpASqbl3k7c0C02G5b81lgTGbdfkRKLGKz0TH1m+4m+mcvdEcxwnQKRydUhoTQx8 W2NA== X-Gm-Message-State: AOAM532My2Bpfp/6p1m6gJzzRh0EPwut4+KWVKZSg3bls+m7PWvNosYW jyO60obZg8lYAzLz0LubSy3VhU+Zc4AyzQ== X-Google-Smtp-Source: ABdhPJy1IzEHqoNEaVIXA5NY0xAM6hTfadLNA2yjnX+KMkFg3QyIHjQuAInkClC6LpQVBZsa+iKiHA== X-Received: by 2002:a17:90b:4a47:: with SMTP id lb7mr15822360pjb.243.1636542077802; Wed, 10 Nov 2021 03:01:17 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:01:17 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Bjorn Andersson , Thara Gopinath Subject: [PATCH v5 19/22] crypto: qce: Add 'sm8250-qce' compatible string check Date: Wed, 10 Nov 2021 16:29:19 +0530 Message-Id: <20211110105922.217895-20-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add 'sm8250-qce' compatible string check in qce crypto driver as we add support for sm8250 crypto device in the device-tree in the subsequent patch. Cc: Bjorn Andersson Reviewed-by: Thara Gopinath Signed-off-by: Bhupesh Sharma --- drivers/crypto/qce/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 84ed9e253d5d..a7d7d7d5d02f 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -309,6 +309,7 @@ static const struct of_device_id qce_crypto_of_match[] = { /* Add compatible strings as per updated dt-bindings, here: */ { .compatible = "qcom,ipq6018-qce", }, { .compatible = "qcom,sdm845-qce", }, + { .compatible = "qcom,sm8250-qce", }, {} }; MODULE_DEVICE_TABLE(of, qce_crypto_of_match); From patchwork Wed Nov 10 10:59:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D30B5C433EF for ; Wed, 10 Nov 2021 11:02:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BBC8A61207 for ; Wed, 10 Nov 2021 11:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbhKJLFO (ORCPT ); Wed, 10 Nov 2021 06:05:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231902AbhKJLE7 (ORCPT ); Wed, 10 Nov 2021 06:04:59 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAC95C061764 for ; Wed, 10 Nov 2021 03:01:23 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id x7so1217857pjn.0 for ; Wed, 10 Nov 2021 03:01:23 -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=rypbS1jQhxD+minj90kbROlU6qvWZNB4H4fxz7GH45w=; b=eYRatg+R0Gnpu0ntSnjoAR3UJbJXsaS3FMVNytVmlu4z/lchxwcywHviyow8KILpHZ peHxX8DhCILn8gr+YXz0e6gC7m+FDmCIauCHyOrSBsf7XglKRj31iY+ux0u9RoWIdsyn TcwLupkN3acv4/WrKCmscLssMK3GUBvsWL9ZCLPEJPgkK+ByZIU5i4lCjzgJj5xLeeLs j5WTL7HCPhAZavVsCbwifeSd1yrDCPrBshyMEoLwBgdx8Hf8S+IjszH8SX5pSFtss4qi +eLKGhKXkawBFTvIH4M2onW6ta1DOYvgmFadzr7fDk0L/lpmUMBSOgwRr8lUHvXRGqQw hgCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rypbS1jQhxD+minj90kbROlU6qvWZNB4H4fxz7GH45w=; b=C7RBvw6cRlWd1G7p7cWP7Uu590a4J9SThsFTWo3Ssyv1LuYAOXXR/WKLfPYpNs/8AC hN2VW9llHMfsJBS8HXL9djw+dLz8xgW/TMZMleh9LuSE78yMheJoVE+ue8SaHa7IQIJj BM/vY1X88kxZTi5fmN0xdQYEynIe++Y0GoGXgDLJpHYJ6lKx6w6tTRCrZIJT8BZDTqeM YRWaEzDh6YkO95EFD0+6bzZv0XZio/hGxI96MkpWuc5lYpXPwMjCaIk6DiXtQ5QHviTv 6lAUj5hpxvuJxB7ma0g6SOBJakTzfmdTL6/XUwgWD+C01LTeayLr6C5X5BiUNBt26Ash vjTg== X-Gm-Message-State: AOAM532Dziu+OQua1l+ubTdsHJ3cmv10+7iwICsFbrN1nLvITc7Q/wDB aPYHRzgeYCjH0E1GvY3Rb/U+3iJEZyfT9w== X-Google-Smtp-Source: ABdhPJwvoWR2oZDeYdoqZr1ekGHBsPNhFe4Jc1GeY9EG7ajne5OayEZpzV5griYK0v7u1FnOV7qDQg== X-Received: by 2002:a17:90b:1c0b:: with SMTP id oc11mr16073161pjb.237.1636542083180; Wed, 10 Nov 2021 03:01:23 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.01.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:01:22 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 20/22] crypto: qce: Add 'sm8150-qce' compatible string check Date: Wed, 10 Nov 2021 16:29:20 +0530 Message-Id: <20211110105922.217895-21-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add 'sm8150-qce' compatible string check in qce crypto driver as we add support for sm8150 crypto device in the device-tree in the subsequent patch. Cc: Thara Gopinath Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma --- drivers/crypto/qce/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index a7d7d7d5d02f..0a11ffacc2de 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -309,6 +309,7 @@ static const struct of_device_id qce_crypto_of_match[] = { /* Add compatible strings as per updated dt-bindings, here: */ { .compatible = "qcom,ipq6018-qce", }, { .compatible = "qcom,sdm845-qce", }, + { .compatible = "qcom,sm8150-qce", }, { .compatible = "qcom,sm8250-qce", }, {} }; From patchwork Wed Nov 10 10:59:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A849FC433EF for ; Wed, 10 Nov 2021 11:02:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 948F761248 for ; Wed, 10 Nov 2021 11:02:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231609AbhKJLFR (ORCPT ); Wed, 10 Nov 2021 06:05:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231669AbhKJLFF (ORCPT ); Wed, 10 Nov 2021 06:05:05 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D106C0432D5 for ; Wed, 10 Nov 2021 03:01:28 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id np6-20020a17090b4c4600b001a90b011e06so102209pjb.5 for ; Wed, 10 Nov 2021 03:01:28 -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=rsJUSeawRggU7HvC1GGQkny+erynvmNA844erz8yhy4=; b=OyyzqvHEGotpRlMylxG78FbvLVcDXUkQRB9SZR2k3eQPQ6grpX3VL05W0fngsblcif mFKJMzJt3T3SGWco6pXk7UOsCfYx8193kD5pyUN+bRj5S3BJbJAFw1z56sNPQhvxcS+M bDpMr877A1sPN45e4frzLakQHBWZWm7pIzNOXlZsowU5vG8ZHhj8q6UzZ0GuZ4KTD/Pb nFBMFLA1FCdNkgS70sGl+kOPcYjbair6Hhn8GzkE4+In8y7nVXUV6TeVLi89IFfhpthR SkQ6mqZ7uWjbcHs0BIOtlLj3OllyKOWgjSI5Ek8RpdXQqRMd1mCJtWYvh+8WNCaMiXV4 w+HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rsJUSeawRggU7HvC1GGQkny+erynvmNA844erz8yhy4=; b=OOR+VbzJliofI91/4O7Y0Vm1c3KEjDQGvOO9PytiSuYBACula9pQRWuPhtOOyLDzdk 96iRPKHv92z3B1JpbQ9cmgBwx1m1lUHgkqpRmJzQF13s0P9CBEmjw2+gj+4bttIPbcJw xOJ+rbdyJKo1ArkkwaEa6BfJJQvQSQ/nockALTNXA99g4FzKGRSf4MYKgYxlNobDDCO2 DGygVOgSUnlswgD2uQ6kdOqcJMTxCtP+RUA92Fv9c+4Uu+7kV9ZHnIrUaThi6nUjhBjQ simmkjJwd5TIyJ7NS1bLsh1doH5K5tI/S9+6mLtrhoqZqZv/pcsobLx0irncs8nqTRyS jtYA== X-Gm-Message-State: AOAM5333hTaWPekzK5ZHEu2UerWyg1PiTm/ufV0dXUgQl2MO7vzPfVSM Cad18d5ArvVKbGle3Qa52LihP/pXNKj+GQ== X-Google-Smtp-Source: ABdhPJy7vzX+EY24OxB4TyLtpk5RbdKef/4eabLR0cRiecJSxnS2mbbv6xg1MFUEyNQZdrgavNUJNA== X-Received: by 2002:a17:90a:bb84:: with SMTP id v4mr16003228pjr.4.1636542087735; Wed, 10 Nov 2021 03:01:27 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:01:27 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 21/22] arm64/dts: qcom: sm8250: Add dt entries to support crypto engine. Date: Wed, 10 Nov 2021 16:29:21 +0530 Message-Id: <20211110105922.217895-22-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add crypto engine (CE) and CE BAM related nodes and definitions to "sm8250.dtsi". Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Signed-off-by: Thara Gopinath --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 6f6129b39c9c..691c28066cec 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -4104,6 +4104,34 @@ cpufreq_hw: cpufreq@18591000 { #freq-domain-cells = <1>; }; + + cryptobam: dma-controller@1dc4000 { + compatible = "qcom,bam-v1.7.0"; + reg = <0 0x01dc4000 0 0x24000>; + interrupts = ; + #dma-cells = <1>; + qcom,ee = <0>; + qcom,controlled-remotely; + iommus = <&apps_smmu 0x584 0x0011>, + <&apps_smmu 0x586 0x0011>, + <&apps_smmu 0x594 0x0011>, + <&apps_smmu 0x596 0x0011>; + interconnects = <&aggre2_noc MASTER_CRYPTO_CORE_0 &mc_virt SLAVE_EBI_CH0>; + interconnect-names = "memory"; + }; + + crypto: crypto@1dfa000 { + compatible = "qcom,sm8250-qce"; + reg = <0 0x01dfa000 0 0x6000>; + dmas = <&cryptobam 4>, <&cryptobam 5>; + dma-names = "rx", "tx"; + iommus = <&apps_smmu 0x584 0x0011>, + <&apps_smmu 0x586 0x0011>, + <&apps_smmu 0x594 0x0011>, + <&apps_smmu 0x596 0x0011>; + interconnects = <&aggre2_noc MASTER_CRYPTO_CORE_0 &mc_virt SLAVE_EBI_CH0>; + interconnect-names = "memory"; + }; }; timer { From patchwork Wed Nov 10 10:59:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12611887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA04EC4332F for ; Wed, 10 Nov 2021 11:02:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A412961284 for ; Wed, 10 Nov 2021 11:02:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231734AbhKJLFZ (ORCPT ); Wed, 10 Nov 2021 06:05:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231645AbhKJLFK (ORCPT ); Wed, 10 Nov 2021 06:05:10 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5761EC0432D7 for ; Wed, 10 Nov 2021 03:01:33 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id e65so1931734pgc.5 for ; Wed, 10 Nov 2021 03:01:33 -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=jxo26PM+v+FavVwWJDiflViEe+y1rULkr8xHn7NoreQ=; b=zhftXFPYnO12H4n30/cgoywIiLqysx+A7rPrWK22HI7wvhzbJwGLfp2YaFIpdBKxZ2 C2uHrfQ7YgTL+K6kIkFJigdyw9jy0vE5FwcIWmfEde4bswYdI40yrRBaxRprUOmjKrwv zSlF/X1iO+sJ0SBudjcl7j9ud4HCBdOvjeOJl+cnHrzWMidplmYiEs6KPsUBYgUBbeOv 7y4uVSUUnRsDh42AVPrB+5cnc5lTxjBURJ2jJv0poNUmsPyOjTjLPi+2Gn0pgdRwXcVU XsV6RwYTs1SHUlm0GNWE744r1IgXycmFobSd/alnPxDfZQiTq/haljbfWNGu1vSxF1B4 iCKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jxo26PM+v+FavVwWJDiflViEe+y1rULkr8xHn7NoreQ=; b=BWj5d26g8fWNzNdaXJR/DF4+ldREeMZ8KVfth+myTgGUowlANSZTY0VDpobXvGX/Zj be3CNI3GGfPzgJmyxl4JFG8ZguA0rB3w/6JM3OICIiHaJYm+6KalcIz0/x7IYCnFuLCP dyoK3THTbcpD5PWfm2VPqJBx4GnlMiw/2/RhOImKce4aw8++iB2NWU+Jxpfo1K7fk+2/ /cN6LDUCmohK1TAhHMBPgCPu1jnS6dEUGf4LqhmPbdgVKa/teu+QB0kZd6M4LIU0H85l t8Us3zJPtVjrLctHHrNR8uKU3CdjE/h9/RcIu/lHK+BOO0AAqNnKOucGJLMNDCMMct63 FIdw== X-Gm-Message-State: AOAM530dMnCbp3hBEseG73Nvn3KB4YZzN6cUAeKYi5d4HQs5g+VT3CRI OGEI9/IHOQtZ0STumu1bm9xz64YwrLtIMA== X-Google-Smtp-Source: ABdhPJwfrC9ZDNHn68Fi6Mn1jXishCHGAfMAf6ZHJ5MivI8p6rLke2bsknx/eSpwXFD+wj09yjYriw== X-Received: by 2002:a05:6a00:168c:b0:44c:dc5a:7ee0 with SMTP id k12-20020a056a00168c00b0044cdc5a7ee0mr15974796pfc.40.1636542092668; Wed, 10 Nov 2021 03:01:32 -0800 (PST) Received: from localhost.name ([122.161.52.143]) by smtp.gmail.com with ESMTPSA id e11sm5585282pjl.20.2021.11.10.03.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 03:01:32 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, stephan@gerhold.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v5 22/22] arm64/dts: qcom: sm8150: Add dt entries to support crypto engine. Date: Wed, 10 Nov 2021 16:29:22 +0530 Message-Id: <20211110105922.217895-23-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110105922.217895-1-bhupesh.sharma@linaro.org> References: <20211110105922.217895-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add crypto engine (CE) and CE BAM related nodes and definitions to "sm8150.dtsi". Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index 81b4ff2cc4cd..2af74a11da69 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -3672,6 +3672,34 @@ wifi: wifi@18800000 { iommus = <&apps_smmu 0x0640 0x1>; status = "disabled"; }; + + cryptobam: dma-controller@1dc4000 { + compatible = "qcom,bam-v1.7.0"; + reg = <0 0x01dc4000 0 0x24000>; + interrupts = ; + #dma-cells = <1>; + qcom,ee = <0>; + qcom,controlled-remotely; + iommus = <&apps_smmu 0x504 0x0011>, + <&apps_smmu 0x506 0x0011>, + <&apps_smmu 0x514 0x0011>, + <&apps_smmu 0x516 0x0011>; + interconnects = <&aggre2_noc MASTER_CRYPTO_CORE_0 &mc_virt SLAVE_EBI_CH0>; + interconnect-names = "memory"; + }; + + crypto: crypto@1dfa000 { + compatible = "qcom,sm8150-qce"; + reg = <0 0x01dfa000 0 0x6000>; + dmas = <&cryptobam 4>, <&cryptobam 5>; + dma-names = "rx", "tx"; + iommus = <&apps_smmu 0x504 0x0011>, + <&apps_smmu 0x506 0x0011>, + <&apps_smmu 0x514 0x0011>, + <&apps_smmu 0x516 0x0011>; + interconnects = <&aggre2_noc MASTER_CRYPTO_CORE_0 &mc_virt SLAVE_EBI_CH0>; + interconnect-names = "memory"; + }; }; timer {