From patchwork Thu Feb 2 13:50:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 649771 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E78CC636D6 for ; Thu, 2 Feb 2023 13:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231575AbjBBNuq (ORCPT ); Thu, 2 Feb 2023 08:50:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbjBBNuq (ORCPT ); Thu, 2 Feb 2023 08:50:46 -0500 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAC7174A57 for ; Thu, 2 Feb 2023 05:50:43 -0800 (PST) Received: by mail-ed1-x542.google.com with SMTP id z11so2077418ede.1 for ; Thu, 02 Feb 2023 05:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Rf0VgEByS+dEGqCN3splXKV9KTkduOfaE2qRRkUgcps=; b=OR0NdpgRzgqiIthozDCVRgHAC3fFyIBoH0kh6aoDCmRIX0KTCVhFyFtPgiB9/s3uns bgiMqn9XVJc67Iq+Y8S4LupNgVowFXCotbmCLTKdp5RNg+2CXUeXuBxWIfNLz10LHaua 3wjDND9W2uYeAv6/2A3MwH9tt8D58nT9w+j/vGSFF6mDBRcWX/8aWb2BDuIstaBjcFp9 BviKgZiH5a7tjQu07J172vq/MUPhU95ywunNvSpf9fGz2q4VcNEWEO6OJtQS9Sx/W3Uh kjrexaPgBDfSlB5OTlNGkWDpcq7H/Ig92zZA3A4UhdobdsWNyMyb3YvR0LWezoKM8NOQ 1BWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Rf0VgEByS+dEGqCN3splXKV9KTkduOfaE2qRRkUgcps=; b=wtXuEEQfpRvM19eT9OnFuejUHk/lUoXpGYfhssCOLTFA2qduSmrVpW1rn2JRCDkzTH skCqY1OFRID9X9pd9ZoiVaORG5kAJpTB78rHxkLuwuyPKl6w0dwUCO7shV6V2pA7veyO 4wCDXM43Ju2SM6SzjuLBilvq15DRW/9CDwaRvVxJEvobKAMihk8BfWy4c62nDv36asmB zTKUMRS1wjnLwNpFtb5nAPE5KiQWJppbi77p0lT1JaAfEiVTqdVxgARuXMcMt3iog+FW eKW9HDRQMeiQpg+u94BgPI81ErN3VaBNILq1BsII0i/E3SNGYGtCt8HBtKP/AX/dUGQh qstA== X-Gm-Message-State: AO0yUKWRsFVziKgr602An8v9ZE7Qt8j3RHnosBMfmpxr4z5fU1Na3I9f QcMGLX8qILg4RsITf4cdcFGp5A== X-Google-Smtp-Source: AK7set/DOJzZLgThxp0kv0e2P5JlVxnl3aQz6FJjGZ81Z2x9kfnHTdGMW3kx2Icjs5DTswJdsRh2xw== X-Received: by 2002:a05:6402:74c:b0:4a2:590b:668a with SMTP id p12-20020a056402074c00b004a2590b668amr6527959edy.3.1675345842515; Thu, 02 Feb 2023 05:50:42 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id r23-20020aa7c157000000b0049e1f167956sm7596332edp.9.2023.02.02.05.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:50:42 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Rob Herring , Jordan Crouse Subject: [PATCH v8 1/9] dt-bindings: qcom-qce: Convert bindings to yaml Date: Thu, 2 Feb 2023 15:50:28 +0200 Message-Id: <20230202135036.2635376-2-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Bhupesh Sharma Convert Qualcomm QCE crypto devicetree binding to YAML. Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Tested-by: Jordan Crouse Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy --- .../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..8df47e8513b8 --- /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 Thu Feb 2 13:50:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 649770 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F24EC64EC5 for ; Thu, 2 Feb 2023 13:50:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230454AbjBBNus (ORCPT ); Thu, 2 Feb 2023 08:50:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbjBBNuq (ORCPT ); Thu, 2 Feb 2023 08:50:46 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 786AF66020 for ; Thu, 2 Feb 2023 05:50:45 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id n6so2039657edo.9 for ; Thu, 02 Feb 2023 05:50:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7QCYdqQ/bmLydThWvBMl8ol4ClUHNrk5t8Rx+9b+yeA=; b=uO+OsJkw621RoLD8CtWflQ9UWFKkuIs3yzudR5MBOF9v1t5tmdCvvjUJ6YANZHew3J Ro0t0D2i/NGKW68HkPP1KK4VuTky/+fRPjZsRVuB50212Y2xVE6kru7/bn1NUTOxkL8w UZ0w8/Q+YSrjteKkdtAKiDS4HqWPbLm7SNvr6WUhrkpydjb8x+d/V2iaLGWZSmvAYeit U0wKRdLYZ/lG5362R1Y2WikkaqLA+ZS1SeHOC3UKbqyw/RvotPlw3R9o7SRN/so5eH5T e2utZ4GO8SBmSleiB80/oO2FIqbQJHwJ+WlefavB/sFRn8ofX8007ECLQ4WM/gR+/Q7l OjlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7QCYdqQ/bmLydThWvBMl8ol4ClUHNrk5t8Rx+9b+yeA=; b=jODIEqYvPfgRGEJcY6/MkZ9dj1CX2mIxtL2RtZTVsVIKMO5oAZHCnxBDIS7FoSq+2o HZqnFN9KchRoFvsDy378SoS/N0mua/L7Adx0moqJlbchGr9D1YJWYeH/91PnPS6hJDSv FqktzyTgVeFVWqWrshwNBwYD0jwggxoWQP8fwa0G0f3myO9UlNu/jtsrgpmHczDLaPBF RtHshIIg5chN/zL1Q0rQenYeaPcQoG1Fu91ZwSnY5kkMsgA3auIySto/6ysXV4CsFvGd h/9wTucDBbSUgW/EDiuUTr7nkkrPvHpvVMZUuCuFsPyc1pY8B0bJiZFHCwKLm1ch8//+ 8Y1A== X-Gm-Message-State: AO0yUKU5LBJ+Cfq4TEpdQBuC2kjCvOaWD8z9ZdePvRAYyEFFZ1DnekLV ixgWdbxfwCOQh4tjdNwztNrIFw== X-Google-Smtp-Source: AK7set+O9Yy03cF0T/DMFgfTHtwInhNbhYOz/+nD7dqVTJVxGGKhLjZcn38Gy9tw1oXxq4pwCNDNIA== X-Received: by 2002:a05:6402:5511:b0:490:ff75:7aa with SMTP id fi17-20020a056402551100b00490ff7507aamr7145512edb.1.1675345844077; Thu, 02 Feb 2023 05:50:44 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id r23-20020aa7c157000000b0049e1f167956sm7596332edp.9.2023.02.02.05.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:50:43 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH v8 2/9] MAINTAINERS: Add qcom-qce dt-binding file to QUALCOMM CRYPTO DRIVERS section Date: Thu, 2 Feb 2023 15:50:29 +0200 Message-Id: <20230202135036.2635376-3-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Bhupesh Sharma Add the entry for 'Documentation/devicetree/bindings/crypto/qcom-qce.yaml' to the appropriate section for 'QUALCOMM CRYPTO DRIVERS' in MAINTAINERS file. Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy Reviewed-by: Bjorn Andersson --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 590bcd047a7f..5530f07d1c31 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17196,6 +17196,7 @@ M: Thara Gopinath L: linux-crypto@vger.kernel.org L: linux-arm-msm@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/crypto/qcom-qce.yaml F: drivers/crypto/qce/ QUALCOMM EMAC GIGABIT ETHERNET DRIVER From patchwork Thu Feb 2 13:50:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 650397 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66557C61DA4 for ; Thu, 2 Feb 2023 13:51:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231939AbjBBNu6 (ORCPT ); Thu, 2 Feb 2023 08:50:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231216AbjBBNus (ORCPT ); Thu, 2 Feb 2023 08:50:48 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4148380FA1 for ; Thu, 2 Feb 2023 05:50:47 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id z11so2077541ede.1 for ; Thu, 02 Feb 2023 05:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/cQTcEdA6/1Tvp2AynCxy/uYQRIV6AL4re0IqB5Qt5w=; b=q2p+aqMwep7goH8XKy/1HZBVPqr6+tPfkQ5inItLuxRzmlUfO2MERmh5RVwUdTfyBJ WN6ToyC/EDVEIMZqGOiuyM1yAmloJhlx/f2sC6hOvNbbUsM55fRF8oIQ+XfUIoWN2KwG WPh7ORmd8iO2LU/81USWb1v3KWw1Zax8vVQiNkQhyjeHdTkKeRNA/tzPqJ/M5NR4C9L4 +bAjkBij6SKUon5MhUg2lwrHdWQScJ19t9O8FSGKXLeS+PbJdKRSUnTyfnywPsgcJLRI RxH++wVs1n9pbMBypMJ4TJANh80Wqc716s3G+1wZNaGElyKdfw1pKlThQSrwq8qvkoQU /4Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/cQTcEdA6/1Tvp2AynCxy/uYQRIV6AL4re0IqB5Qt5w=; b=B8ESH5sYeC0MajO6q6m/+riknHM4rnx4vLgjCDhz4RRPJjfmBu1oea8RI3EVfm+R/1 G01bxnWnUGvPFSxJ5l/8S6Mi3Rn8WLn9LlKfkhz7Zt8MOqhsHggASe1kplB4CPEiuFT2 JwUHPaatJ/18idKG9Zo2vCsDAtGp5CFJIqdJQi655yojWc1l+rDHlMK1cy3uoV/irYeQ MNhiDED0YE0Ik5+Mhq8/levlxNErBEC8bseQ2z3k83GrKExBcKe5EfjvJQzK3muw4HqW vO+VsPa+syTn3WBmR5fc8FULW3Xxp8e0stseQm25tUasvXnOwnswoOGcfoyKx5gUGt1w Ryfw== X-Gm-Message-State: AO0yUKUvqq4YjKiqKDVK+wrIdmCSEM32ScfE2NrR2uLPYFdRA9zDTLsm iNh2uyBlCj3ShM5LMNzNFsmcug== X-Google-Smtp-Source: AK7set9pUxFXKK9ndQwW5SNMTn+1D5+xLi8VdgZNTAwtdHJvAkQDTFd/DFKo0NAJ9tMOBCHXY+eEig== X-Received: by 2002:a50:9ec5:0:b0:4a2:64d7:866 with SMTP id a63-20020a509ec5000000b004a264d70866mr6839171edf.0.1675345845795; Thu, 02 Feb 2023 05:50:45 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id r23-20020aa7c157000000b0049e1f167956sm7596332edp.9.2023.02.02.05.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:50:45 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Rob Herring , Jordan Crouse Subject: [PATCH v8 3/9] dt-bindings: qcom-qce: Add 'interconnects' and 'interconnect-names' Date: Thu, 2 Feb 2023 15:50:30 +0200 Message-Id: <20230202135036.2635376-4-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Bhupesh Sharma Add 'interconnects' and 'interconnect-names' as optional properties to the device-tree binding documentation for Qualcomm crypto IP. These properties describe the interconnect path between crypto and main memory and the interconnect type respectively. Cc: Bjorn Andersson Acked-by: Rob Herring Tested-by: Jordan Crouse Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy --- 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 8df47e8513b8..94f96ebc5dac 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 Thu Feb 2 13:50:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 649769 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 436F3C636D4 for ; Thu, 2 Feb 2023 13:51:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231391AbjBBNvD (ORCPT ); Thu, 2 Feb 2023 08:51:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231743AbjBBNuu (ORCPT ); Thu, 2 Feb 2023 08:50:50 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF55D8F25A for ; Thu, 2 Feb 2023 05:50:48 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id gr7so6122167ejb.5 for ; Thu, 02 Feb 2023 05:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+zPdqAVNJI8VFw+E8thVrlhFODN9g8GlhI24Q34QDNM=; b=xkt5fSFaBJho8h7UG9vENvhjDy171tUIop7AB7aQ7RVX2ee4jmyR6xnIml9wyQrUDn o8SLo2Jm3RBREBi7Gx+jHqLbcX4/AjAVpO3j7dHcVr9yMHln5M5eCOlLLoFqqUobKbgF gxoj4DMKM2VXJ+M1YarDK/CGCkiYlMemrh/8b8DciYJh9ieHtDjOC40dHOtCzXrP19wV cjlqQ82JoZAl2dOUEe04emqhjMmTnnz1cpPJwqrLhRf199F33aq/qojZK0vrKS0iLySA izdixL3D4xrf4ekXQTqb/IT6Bvc0sZu3sfH7tTOY4MWbKpPfjAE+N6NFJ6Bz94vasuqF VO3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+zPdqAVNJI8VFw+E8thVrlhFODN9g8GlhI24Q34QDNM=; b=XTJP3C/4yfnoLvwaub9ZqR9U1oqIedd8qYQ2kPXV5uyyAXmOE+yf+G8uhGdwjs/O3s zv3zScPfJ95RlkLygmyafpCq5vptKbfxOLlJ9IV/h/FxnLecSfxjmRZsR25LnrylOdEV C9sqguokGBnj9p5j7m2FuoZYjsbkRwZtttkt0l3J2/hlE90o8YfSmzq4kQWZv9N9M3yE PJRP3RvOSDtEGb2mcK3vL/WhlVa/fk75rkR/YqQeHB5wdGTGc8WX9pZq56CZtfl9NzcJ 5kwfz61R8QuUoG/yaO64g60bTEU0eWcGK4z/i5Kp4K41sCLdcvS3je7OWg0v2IrTO4bT FtTg== X-Gm-Message-State: AO0yUKWq32dS7w2+REwDYe4isnS1C0/F3uSIX8xkvXQuqdTdN+8uhovs m/yKNkRmOJgwEKDeTs+5dbg1EQ== X-Google-Smtp-Source: AK7set+d+HsZwHjXohQNciwKLGCx2roMBm0KGC3YJNl/uSvLOKbPupalGTRAJvFqIPKknMC9zIH/xg== X-Received: by 2002:a17:907:cc25:b0:7c0:d7af:fce3 with SMTP id uo37-20020a170907cc2500b007c0d7affce3mr4819110ejc.1.1675345847460; Thu, 02 Feb 2023 05:50:47 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id r23-20020aa7c157000000b0049e1f167956sm7596332edp.9.2023.02.02.05.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:50:46 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Rob Herring , Jordan Crouse Subject: [PATCH v8 4/9] dt-bindings: qcom-qce: Add 'iommus' to optional properties Date: Thu, 2 Feb 2023 15:50:31 +0200 Message-Id: <20230202135036.2635376-5-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Bhupesh Sharma 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: Bjorn Andersson Reviewed-by: Rob Herring Tested-by: Jordan Crouse Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy --- Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index 94f96ebc5dac..4e00e7925fed 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: @@ -72,4 +78,8 @@ 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 Thu Feb 2 13:50:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 650396 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 557D0C61DA4 for ; Thu, 2 Feb 2023 13:51:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232341AbjBBNvI (ORCPT ); Thu, 2 Feb 2023 08:51:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231705AbjBBNvB (ORCPT ); Thu, 2 Feb 2023 08:51:01 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1F6A8FB49 for ; Thu, 2 Feb 2023 05:50:50 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id mf7so6111388ejc.6 for ; Thu, 02 Feb 2023 05:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fuFiTTM6JEhHJzLRQ/j1mXJ8nHJb7It1hei8p86wkig=; b=IDl3F/0c3cBy9P1lwXlE2TEeOR1WFlgPz52kdt2loNZLMDzdMWGJB5gt89dxD2bL/G pePR7iJjZ6aCuzKyIxP49MRM6NnJirPG2ZbNbEIKci9Vct5VAX9KDihBL2E+VBjaJZVo FKDRpex8qMtM4A/XrFBt4NO7CMdO88iA8Nccw+xWZYN0AfXY8GZFY6Q7HJBJ1xiku6kB 9EkgnnS8AvR14nWZL4sxzGj+3RTgXsSDsNXqg9r0VK4j2o398dLIu8dyP6PyPLxhLYgd bsRq7wDKoruGxO3wnaoeLkgH1qfe2r+UI2qsXjeRIxXwf9CHM0n+rM2hxo5Z686OyQ8q tJYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fuFiTTM6JEhHJzLRQ/j1mXJ8nHJb7It1hei8p86wkig=; b=hiaBQswlmAIQI3uRdaheRN5juS/i9U8bFbG7PNYHFwSib2MR7G4YUxzZtWtR1ujGB/ HgYqB6SJfRKOGA/6e1GUi8YYLtsQekyJGLNO0BHxMVo5sW81w61VLEXxeGpWi9WwlNRv H7vv80KEr1OTSUSEV27/bc6EilsRrb7rretC8cexxDXf88XLnYu4Y9zwtHHwmaFqRyx0 TzZzq+6KCNM/ag3qCrkYj5iMfdqn/X08BlZ5NoLka4DZm37g3pSfclcgt4EJJHw9qaLS ERdR0BogPMV5kVZp+39qS9jBPhmRmTunkh71LkutXxbkUYKcmmB+kEb9I5vvO1k3/UbE mIUw== X-Gm-Message-State: AO0yUKWEz9tRWAGy8f+GO4otmpEQnQOOXmhhlMmImMQInSOv5zr7HuEC u8th6jG4hCBrFKiXvbTPwP5s0A== X-Google-Smtp-Source: AK7set8gPQbo9ZbJBkSzUeLY+AdrtbASn+bQuTN2nc9XWMgBDr9nl0PkFXXO9V6dmfItr4QAPPUT7A== X-Received: by 2002:a17:906:106:b0:878:51a6:ff3d with SMTP id 6-20020a170906010600b0087851a6ff3dmr6944454eje.4.1675345849108; Thu, 02 Feb 2023 05:50:49 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id r23-20020aa7c157000000b0049e1f167956sm7596332edp.9.2023.02.02.05.50.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:50:48 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Neil Armstrong Subject: [PATCH v8 5/9] dt-bindings: qcom-qce: document clocks and clock-names as optional Date: Thu, 2 Feb 2023 15:50:32 +0200 Message-Id: <20230202135036.2635376-6-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Neil Armstrong On certain Snapdragon processors, the crypto engine clocks are enabled by default by security firmware. Drop clocks and clock-names from the required properties list. Signed-off-by: Neil Armstrong Signed-off-by: Vladimir Zapolskiy --- 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 4e00e7925fed..a159089e8a6a 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -59,8 +59,6 @@ properties: required: - compatible - reg - - clocks - - clock-names - dmas - dma-names From patchwork Thu Feb 2 13:50:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 649768 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0A76C636D7 for ; Thu, 2 Feb 2023 13:51:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232417AbjBBNvK (ORCPT ); Thu, 2 Feb 2023 08:51:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232089AbjBBNvF (ORCPT ); Thu, 2 Feb 2023 08:51:05 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59F285EF88 for ; Thu, 2 Feb 2023 05:50:52 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id m2so6085202ejb.8 for ; Thu, 02 Feb 2023 05:50:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k1P4BmKVoM4WJy6aig5rieOVj5RerisqiQF5OT6iCjY=; b=hRpVImmxZniqQkapnMCar5U5wkC9eGWxPUNDNVF1Y3GCcmiRMgd9piM6lcpAw/UWg2 udNyfpZjNr/JqOER0rvTii8XIRVV9cwYo/3ElVxdblJMmQDh0gXWBlCottEjOhQDJZUK +7fAlqZ68kvwBrPQbMff6Y6sk58i8PVKcdMJW3XFfu+9TyM/P4Guc/O5SA52+xe6rGK2 QEqdtNubtAQEqQ2WcgDSKbQLNimfyxi28mpbqe/JmEhURRT6A7/u7qQNAlBz8bBLmqHM +cLmzzujFeFN/L9kV76RVzWmV2u0hMNjwsFcXU4qr8TZZB+egCkTU3OXZwHqzEcK9Wr2 eCAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k1P4BmKVoM4WJy6aig5rieOVj5RerisqiQF5OT6iCjY=; b=Tp1LAwSbHPAdS+pBID4cjyvcpd5Wwwc2DlZyblOzaMjU+sRixEPJ9bQnObFzL/2dhS ciJbJ3kEccBuZ0Kh336PP1ec6HJPecbVGMCSDQVT1g15TkEocywm7/Jz6nJqeZNN3CYl +plzsRDWRvI6S3Kvp40QoMOlXVGSDHslmhTVJQrRHY7w5m6a22m9VFTGmyTtv9LxZYwV fOYavzmCESuD+sc0A0ECzdkrp5G2vucRn1Ip+zDeWQSkwwkAEqG38cvB0uC0s2uWfJhB jsSyTvxWxc5yHV6IFBRJ1FuXlc+ephO0twiylfq2cVpp5EBa01xBxk7ggcyloEmtbgzz Z0YA== X-Gm-Message-State: AO0yUKU/m3VLvzvxkGd310J6pxHmd+nNiH1YmzGD6KmCkno/vB2qkVUb bBXn+gO3BpiTuadWwfWcd7slgg== X-Google-Smtp-Source: AK7set+g5jTvG/NOdtCPrjOchy0lRQ+8KjTwLoFtd7CPYNPM01Ga3Xp369rZiq4CsTirrTr2nqkI8Q== X-Received: by 2002:a17:907:2ad2:b0:889:3d10:ae93 with SMTP id fm18-20020a1709072ad200b008893d10ae93mr5738774ejc.6.1675345850913; Thu, 02 Feb 2023 05:50:50 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id r23-20020aa7c157000000b0049e1f167956sm7596332edp.9.2023.02.02.05.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:50:50 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Rob Herring , Jordan Crouse Subject: [PATCH v8 6/9] dt-bindings: qcom-qce: Add new SoC compatible strings for qcom-qce Date: Thu, 2 Feb 2023 15:50:33 +0200 Message-Id: <20230202135036.2635376-7-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Bhupesh Sharma Newer Qualcomm 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: Bjorn Andersson Reviewed-by: Rob Herring Tested-by: Jordan Crouse Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy --- .../devicetree/bindings/crypto/qcom-qce.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index a159089e8a6a..4e0b63b85267 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -15,7 +15,22 @@ description: properties: compatible: - const: qcom,crypto-v5.1 + oneOf: + - const: qcom,crypto-v5.1 + deprecated: true + description: Kept only for ABI backward compatibility + - items: + - enum: + - qcom,ipq4019-qce + - qcom,ipq6018-qce + - qcom,ipq8074-qce + - qcom,msm8996-qce + - qcom,sdm845-qce + - qcom,sm8150-qce + - qcom,sm8250-qce + - qcom,sm8350-qce + - qcom,sm8450-qce + - qcom,sm8550-qce reg: maxItems: 1 @@ -68,7 +83,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 Thu Feb 2 13:50:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 650395 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0666C05027 for ; Thu, 2 Feb 2023 13:51:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232285AbjBBNvP (ORCPT ); Thu, 2 Feb 2023 08:51:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232152AbjBBNvG (ORCPT ); Thu, 2 Feb 2023 08:51:06 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 169688F262 for ; Thu, 2 Feb 2023 05:50:54 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id eq11so2049106edb.6 for ; Thu, 02 Feb 2023 05:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EBem2NaL280LHTVogyWEkwH1nm5H/eL2ckWJlZxEMdU=; b=waAO7eaGLH9YW7nyuYw9i0PZ4GBokzdDGaHtmj5eS6oVRzJwgJ5oPHMFiFInriZNBR Pr8PfSVGjSmtmTtF8jxbAoySOTkhNjTLuiALLFnEn8KqnrQJJPDfHpi2ITLWLEm+yQuW mnBYjcewSZN+MdH3ebEdpSwKdOIS9APxmWWntD84YPBuYJajuaem/d4/llMselDS+VoR 3K+tvuWqqcIJmMTu4I9pbfhc2BVLKsUqvsKjvq/VL3gc1gTso197JtxZAXF9HO/4EZjk cBR7EPqBc8RLD+YzuNgWWDhgmwPayvpsrM2dHN1T3EXpyCxN7bHxVFRyKiTy5i9JfO5o 8qxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EBem2NaL280LHTVogyWEkwH1nm5H/eL2ckWJlZxEMdU=; b=f/ohpiGKxP+vlkWpkVxOngfo1gBGUtWUhuCP5PmYiGHkJa1dUUg+2w3Y3M8EF6UEJf rfUw42QdCUHf0cjOtZb/F84PcvViGxGGULXNR5eR4HpY7yr2q6QsDLWhPFkbXJ17s9Da /EyEbd6ochz0xb2dUMRgiuKWr+3o9ug6mkTaxVAnK3TGgWE4Ncoz/bpAZyg/paQXCSvg eWez8qHE4L/97gSWctYd1GCjRFcdOIqHNoD4JSGx8msMpACIABYr8pOGsLmGwxM8v+zl dGh/tMsZRjcTmaBA+3bSKLzAFbRgmBluXH0UmgKITz8AjQ8nhozQbSVpf9MxZSwAK+dG pQ1w== X-Gm-Message-State: AO0yUKVGvUR3AbQpEfqZsI8DOqkKZZUQec2+TmJzoV5VSDsI6zY3v4L/ EzsWzLWmUBHDR7M+AkfFEvHOTA== X-Google-Smtp-Source: AK7set80HZ1RwZVRBTxF1gSeizwJ0UtCiFFwG86Zvs8f04+P40LFmAJW6dymStwZ42bbc9fGCio3mQ== X-Received: by 2002:a05:6402:34cc:b0:491:6ea2:e88a with SMTP id w12-20020a05640234cc00b004916ea2e88amr7470846edc.2.1675345852595; Thu, 02 Feb 2023 05:50:52 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id r23-20020aa7c157000000b0049e1f167956sm7596332edp.9.2023.02.02.05.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:50:52 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Rob Herring , Jordan Crouse Subject: [PATCH v8 7/9] crypto: qce: core: Add support to initialize interconnect path Date: Thu, 2 Feb 2023 15:50:34 +0200 Message-Id: <20230202135036.2635376-8-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@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 Cc: herbert@gondor.apana.org.au Tested-by: Jordan Crouse Signed-off-by: Thara Gopinath [Bhupesh: Make header file inclusion alphabetical and use devm_of_icc_get()] Signed-off-by: Bhupesh Sharma [vladimir: moved icc bandwidth setup closer to its acquisition] Signed-off-by: Vladimir Zapolskiy --- drivers/crypto/qce/core.c | 16 +++++++++++++++- drivers/crypto/qce/core.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index d3780be44a76..336edba2513e 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, @@ -218,10 +221,18 @@ static int qce_crypto_probe(struct platform_device *pdev) if (IS_ERR(qce->bus)) return PTR_ERR(qce->bus); - ret = clk_prepare_enable(qce->core); + qce->mem_path = devm_of_icc_get(qce->dev, "memory"); + if (IS_ERR(qce->mem_path)) + return PTR_ERR(qce->mem_path); + + ret = icc_set_bw(qce->mem_path, QCE_DEFAULT_MEM_BANDWIDTH, QCE_DEFAULT_MEM_BANDWIDTH); if (ret) return ret; + ret = clk_prepare_enable(qce->core); + if (ret) + goto err_mem_path_disable; + ret = clk_prepare_enable(qce->iface); if (ret) goto err_clks_core; @@ -260,6 +271,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); + 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 Thu Feb 2 13:50:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 650394 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17573C636D4 for ; Thu, 2 Feb 2023 13:51:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231486AbjBBNvV (ORCPT ); Thu, 2 Feb 2023 08:51:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232261AbjBBNvH (ORCPT ); Thu, 2 Feb 2023 08:51:07 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9ACF8FB64 for ; Thu, 2 Feb 2023 05:50:54 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id cw4so2018300edb.13 for ; Thu, 02 Feb 2023 05:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oCbqvORx24QYDOSwcFJXyWQd0s0yT+w31F5oNZstwBs=; b=bmmg3KkS0nzITvHmzjv661grJmumPmx8/8K9g7d7Oh2ZCJY8hOoUZkJPa8pJW46iYD xAUFij6lYoXFfTb6qfRo3Lsf8BCWXXwMx0a5Tm0R4zX/yck4nUWBqHsgAGvN3wDKJW00 h7mqVxbLIE1aHkPdAYvP3UKDrAbhgXSgj1XOgnJBbxQuqi62knS/p3k6pq005OEpniB6 HRUSO6nwBVTD0uzy1srgQD9UuyMWOuVzIsdrIHyqtg7g4mM39TsYYKQO80axpLvvCCQZ sYX2z+rMm6q4wdIrA9YAgC22BpOEDw9y+HYOGard8PEsZz4g3yk8vuc6isK4qabV+2Bk 9T3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oCbqvORx24QYDOSwcFJXyWQd0s0yT+w31F5oNZstwBs=; b=VJebI1O+C/1/otJH8+9VCNbtcUSYSZ53y4hL39DritGstYK8KysnbHB3AmkLJ5x/AS OLbAdTFSO7OjZo4+dGfEDsAAvUeOD2FLNH4biEFdG8a39nmHVzZM8QrTuIaRe3oLFOdX KyOQkYOQCnQN/UO9b3VjdoQDd7EsH8xSCrQ0OOd5skPPahO6fLrYNIajEXh3EvYdszRP vtcIkPmoxIwaGU4EWd7i+Q+S5axbLt5grWsq/6DKY6FBBYfLri2w77XFRpwtj1GTi1wF zWzhcRwSneTkVb7pmPor39XBVgf74r5BuihCw2WrOT78c35lN9pORw4Q+wYPKE/JDTNE /YFg== X-Gm-Message-State: AO0yUKUSlRaTuhR84NPqvQrCtwoNU6SKROcGPNESObaXEu9JVe8aqhGl keX81CVYt69TaNJe6mJ+3V0jgA== X-Google-Smtp-Source: AK7set+5WXg+XjiI2lc5qdpF6HR4DET7H/I4VycOwstEgIu9xLxEX+9Wo3oax3fAcYLWaEOwdSh3PA== X-Received: by 2002:a05:6402:74c:b0:4a2:590b:668a with SMTP id p12-20020a056402074c00b004a2590b668amr6528640edy.3.1675345854269; Thu, 02 Feb 2023 05:50:54 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id r23-20020aa7c157000000b0049e1f167956sm7596332edp.9.2023.02.02.05.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:50:53 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Rob Herring , Jordan Crouse Subject: [PATCH v8 8/9] crypto: qce: core: Make clocks optional Date: Thu, 2 Feb 2023 15:50:35 +0200 Message-Id: <20230202135036.2635376-9-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@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 Cc: herbert@gondor.apana.org.au Tested-by: Jordan Crouse Signed-off-by: Thara Gopinath Signed-off-by: Bhupesh Sharma [Bhupesh: Massage the commit log] Signed-off-by: Vladimir Zapolskiy --- 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 336edba2513e..8e496fb2d5e2 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -209,15 +209,15 @@ static int qce_crypto_probe(struct platform_device *pdev) if (ret < 0) return ret; - qce->core = devm_clk_get(qce->dev, "core"); + qce->core = devm_clk_get_optional(qce->dev, "core"); if (IS_ERR(qce->core)) return PTR_ERR(qce->core); - qce->iface = devm_clk_get(qce->dev, "iface"); + qce->iface = devm_clk_get_optional(qce->dev, "iface"); if (IS_ERR(qce->iface)) return PTR_ERR(qce->iface); - qce->bus = devm_clk_get(qce->dev, "bus"); + qce->bus = devm_clk_get_optional(qce->dev, "bus"); if (IS_ERR(qce->bus)) return PTR_ERR(qce->bus); From patchwork Thu Feb 2 13:50:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 649767 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38F2CC05027 for ; Thu, 2 Feb 2023 13:51:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232283AbjBBNvU (ORCPT ); Thu, 2 Feb 2023 08:51:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232318AbjBBNvH (ORCPT ); Thu, 2 Feb 2023 08:51:07 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B5CD7F6B4 for ; Thu, 2 Feb 2023 05:50:57 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id v13so2025374eda.11 for ; Thu, 02 Feb 2023 05:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bnZ4Sd2YODcDYA7OAgTUgwmpZPLk3snZO1ph9Ml4xaw=; b=y5gctVTvEyV+jf6SE2ZDAH8jJMLfKnhYQYazC/xZwLoovvRhtnIldun94egmr5Vlo4 dXSuOv6SZqmQjG/EjmqkSHIRmSBbROrnaiBaXylf8cymwsa11y0EHZ3aUafmBcORqRIb hWALb6fOcXjeCXgcuWlq1+vHC2JGvs3Jxzb/BObp1VwIDOiU6waPmTyyK6m9VJRpTFZO rk45A57DJeXaQXrIkXcvFm0KiWpd9LyQK0cEnGWKcBO/a580I1AEHXe/u5qoI5e9E0GM RCYNotyiHP6bSFGqU+CxI8toQ1PLZA3V+kOzC5AFo0xaz6iRzIjl07nGeAg8Nt/94Y+B iAEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bnZ4Sd2YODcDYA7OAgTUgwmpZPLk3snZO1ph9Ml4xaw=; b=7vaDZcudDztHQEGHLIbKJX30acQTbZbehfoiRGtwUAVcvs1Q1OlVKZWtJsGM65Wscj HMYodwf4YZc1sL5HZWvpmR1tdti1n27Di4/E8qNI5vPTfDf82rPBBi+X0mVa1YsXVeUl lmOvKH47HWl4flFKN61GQZVPva55ZyTt48o3vbjWRLzYknilPeMhWk9CMcN2WYBQ8xr5 PX+s5QbzXjsrS7wyolylMaO4LgB1GqWtGtJr78DjY3ALdDtpbApRuxFWUBct6cw4qIGx 5aOhAkGEZIL4u0a96BsEeNSqvjfXcZ6Cp8irsieiUlnCK91hk/YK0/VUpo3L8+uagN1l 6lYQ== X-Gm-Message-State: AO0yUKVfIFfWM4z64Os7sngoX8rq39GNbaCwp9/P3nmBFcjpDtseKZ7Q ymftDL2fQlZIQVWAMhPsTFip3g== X-Google-Smtp-Source: AK7set/hwBTHqpLOwfstIVfiAKLMsbwFdgJzBBiwQPIytgA0gSi9CTKiorTNia9dedR3AI8H+fRDYg== X-Received: by 2002:a05:6402:34cc:b0:4a2:5b11:1a51 with SMTP id w12-20020a05640234cc00b004a25b111a51mr6761353edc.2.1675345855901; Thu, 02 Feb 2023 05:50:55 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id r23-20020aa7c157000000b0049e1f167956sm7596332edp.9.2023.02.02.05.50.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:50:55 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Rob Herring , Jordan Crouse Subject: [PATCH v8 9/9] crypto: qce: core: Add new compatibles for qce crypto driver Date: Thu, 2 Feb 2023 15:50:36 +0200 Message-Id: <20230202135036.2635376-10-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Bhupesh Sharma 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: Bjorn Andersson Cc: Rob Herring Cc: herbert@gondor.apana.org.au Tested-by: Jordan Crouse Signed-off-by: Bhupesh Sharma [vladimir: added more SoC specfic compatibles] Signed-off-by: Vladimir Zapolskiy --- drivers/crypto/qce/core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 8e496fb2d5e2..2420a5ff44d1 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -291,8 +291,20 @@ 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,ipq4019-qce", }, + { .compatible = "qcom,ipq6018-qce", }, + { .compatible = "qcom,ipq8074-qce", }, + { .compatible = "qcom,msm8996-qce", }, + { .compatible = "qcom,sdm845-qce", }, + { .compatible = "qcom,sm8150-qce", }, + { .compatible = "qcom,sm8250-qce", }, + { .compatible = "qcom,sm8350-qce", }, + { .compatible = "qcom,sm8450-qce", }, + { .compatible = "qcom,sm8550-qce", }, {} }; MODULE_DEVICE_TABLE(of, qce_crypto_of_match);