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: 13126104 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 E16A1C636D7 for ; Thu, 2 Feb 2023 13:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229690AbjBBNur (ORCPT ); Thu, 2 Feb 2023 08:50:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbjBBNuq (ORCPT ); Thu, 2 Feb 2023 08:50:46 -0500 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7EA76B37F for ; Thu, 2 Feb 2023 05:50:43 -0800 (PST) Received: by mail-ed1-x541.google.com with SMTP id be12so2061496edb.4 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=tOP/FG1fTANY6M4Btb9aCXWZr7p+7s7hsSP4vL/YH6FSpnlSjDOvdwYRCZSSEs+wim XIDFZRUz8yau9b+wbvWl8UYUsZgUZbbAQNG58lTzplgv0tWHDLMO+zpEjGjGI/5ruaEl NfBKJdnOE/cYb+KFwC3VpM+y8o4bQwkePEQ4WPAMGZF4/YsNO5c64mbcrxVOWwHk7GM+ jcjQdH8VYX5EqhKS1OMZVkShzsqw4i9a0WiWd3AsCETq2Pfwq3HDmaT61Rhd03h8CFhw mdwDAvEmMH9AzZ0TgoECdTtLaGl0ZLtqkD0Ut88kp8tqzqo247HVQu6+z4gx1iiD/BDf tM3A== X-Gm-Message-State: AO0yUKU4OwU3ZT7VZ6rTtLSdbcO0/Jp7EY64QdgpyABofIYcPjMdbWuh llChgZtJjg0KXd/03sFzgQDycQ== 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-arm-msm@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: 13126105 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 07FFDC61DA4 for ; Thu, 2 Feb 2023 13:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231864AbjBBNus (ORCPT ); Thu, 2 Feb 2023 08:50:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231743AbjBBNur (ORCPT ); Thu, 2 Feb 2023 08:50:47 -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 7B6DD74A7C for ; Thu, 2 Feb 2023 05:50:45 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id cw4so2017761edb.13 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=vmM/pCCs5rTaZK7FQ3SfIZ8vaFV0s++rBNS05iZ4PoL7U3BbATu0gJUn33lp+A/7me LRuijS6W57AeNzv29vXS1Et759NG9TusmzFsS1RHFsW5+hrdjwCa5AS3OP+qb5LKh93U tFWSjkppDF3ZThc1EfDXbS7oA8vVe9FY3W1oXb3qxhY0SoFK9mtNvzB6Fz1MFBVphDZp q25+Ik+XIsoXVGNHHaLxFOqCGPunwRIbks5a7R0k2WstJBG/r8lRcl4dpSQixuWXfKIu CGxm/noV14MQ8btqhZrIVyUcpfkV4AnxMGGZM3B8dauRie2W028MvsgL4lBRAHkErdWH HwBA== X-Gm-Message-State: AO0yUKWbfwY2Gb7XEp1PuMysMate2RKDVAT9ZAKGo6Ns2YbXsZIkG28D orfDF5BDCq34EdFSiswiwEPODw== 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-arm-msm@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: 13126106 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 1EBFCC636D6 for ; Thu, 2 Feb 2023 13:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231932AbjBBNuv (ORCPT ); Thu, 2 Feb 2023 08:50:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231748AbjBBNus (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 413DB6B37F for ; Thu, 2 Feb 2023 05:50:47 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id v13so2024879eda.11 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=2fXJJPEBUhF2qnCcOhEyUfrKlxQPNS6QJOkWWLqGOiQnlI23R0JXYIwc1i/weOkQED zroFrMWYYbGF39UD98eNZFJmd6cOXwjGWhf/2MLicPH2NY/UoB70P3puk/nEZQUxr/8K tB0a1Jg44648vXl3io6MyRTIS6H0EY5jTXkAR8NVnjEavl6JstUheYH8i7MMZiI9EkYE DQbh6YY4+3xfXL/MuU8eaM8Yz02V7jnyBZJmdJPGcvtNZrweAAqRQ+8Fk4hmm4Y6mD/Y 4LG76dbSOT7uSVGVTyiLZu+I+Li9zdcDVcnK4NueqHFvleqQcDG7YjNz20h0/RiyLnjC w3dA== X-Gm-Message-State: AO0yUKUaLQrvy5Obdavkp6+fk1FvwkDhFdN+W9PcbeRkkv/5prjN9tc/ eAuSZw5GoBoV6+3X/Q+i6uXcBFj8KCh+B+6nkJkzRw== 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-arm-msm@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: 13126107 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 325C6C05027 for ; Thu, 2 Feb 2023 13:51:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232056AbjBBNvC (ORCPT ); Thu, 2 Feb 2023 08:51:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231391AbjBBNuu (ORCPT ); Thu, 2 Feb 2023 08:50:50 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB9638EB47 for ; Thu, 2 Feb 2023 05:50:48 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id dr8so6024450ejc.12 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=v4Ko8P9y45Z8Digf2BXYlIsq4fUX2rGFeErSSsJKREaeR6VAVEqFrhR05owe/Z0bq9 d9bKzwAkzx6wsRS1oGzjjUiDK1Ro1BdKHmWiFayZ5TzLXExNNuHhPPu9WiBNcE5lEBtl dKbxNf8AFyh4WWIvqV+wUufkaf5ZSBgfhMa0AsNOFum/sJxRDcAa4dxHNHWzMGouqoXS veALKUMBMwk+Tg6mgOikJrBkjCO4f8ac3wV0U8w6CXZwu3wiA4ZnV3fllfn9mVu7R5DE mvDQ5/NnJaoDbt9yGdAqpOE0jB1LWMibZVGoDWv60vaV2GJNcBrRhPLVfhhBa/uAD8aD Yvtg== X-Gm-Message-State: AO0yUKUx2AOjUUgZC5zCtC3HtT4TW+7/mw+tyyI0fW6NrXWOQMrx/bJv 9um2/KgPNi7A3Ie7JIeX1HEPgw== 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-arm-msm@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: 13126108 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 732C8C05027 for ; Thu, 2 Feb 2023 13:51:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232329AbjBBNvI (ORCPT ); Thu, 2 Feb 2023 08:51:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231888AbjBBNvA (ORCPT ); Thu, 2 Feb 2023 08:51:00 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1DA98AC2C for ; Thu, 2 Feb 2023 05:50:50 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id m2so6084923ejb.8 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=w8vDXA6rbfMWy9f+1LQ0rrSuTsocipDmzSVyEg+ZANqsRkchT/ykefztTqukl5CQe+ khHSxYxqNRob932pvFS6D42RX3jtwGCHUCtkLhhYC5Klni8NWSxkePXTusNSQIvwkN9j FwwrN6r9t6/7/ktPFs+VuP0DYUjRfqKbNAEe85OGBadGdJwKchFebn1OFaFwgpWLwhEP nRo3IEIAy7VLjvJexbJRosCHlhsdQ/3uiaYT8NzEWhI0MxSJtru+AdUvRJKEUuO1WjTd +e3l6xRXLnr4oMH9zJQDn50ORYJBgLFWI80u/dmC6/NsCgRnSct7I501Hb/stIvXte9G OXYQ== X-Gm-Message-State: AO0yUKX4lIWCxiP90l7QoN9GEIRn1tq8sq12uyIy1iGc6jM10/zew0tD YcMn5wtGFqQlIRUgv3/3tQRkN/wZobvmLRppq+mBGA== 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-arm-msm@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: 13126109 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 E1857C64EC4 for ; Thu, 2 Feb 2023 13:51:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232406AbjBBNvK (ORCPT ); Thu, 2 Feb 2023 08:51:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232108AbjBBNvF (ORCPT ); Thu, 2 Feb 2023 08:51:05 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A57B8BDF0 for ; Thu, 2 Feb 2023 05:50:52 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id mf7so6111602ejc.6 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=zBkObvRel3/pfLvDYzDCqVsOXfNjLnTX9BqpYQW2HnwyNufhSdB31K7aGDtHCMLtdh i/0FEiIS80GNEguoqpyCG7ml1twHLMl1mDfa4mzScaht82hatPvr7mYFZLAv/2cHEjsn RNqSoMint0Smow6Oi3t+pI/JU2IN3GKBsX131H0fDSjk/n0PeAlgp7YwiyPYL2Z4+O2p jz7cfjAStOUc8kKZUt5Kas4fVyWiTdNz66gILK4ogUwFRhNPxlRNcpTP+/m1ewLvyNLc AY6KUUZpo29/EWwzqjR19MkIG244n2RFOJRAf8iX068tNsNWyejESeXf0yI90z6geGY0 Dcww== X-Gm-Message-State: AO0yUKUkBoYuRe9JNM6WR+MUNGEFxGXLdeg3s/VkpQdSgz2/DaXRf4kq R9HjIreFCJL4+ZIAFeVU6cPQzg== 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-arm-msm@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: 13126110 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 7ACE1C636D4 for ; Thu, 2 Feb 2023 13:51:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbjBBNvL (ORCPT ); Thu, 2 Feb 2023 08:51:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231676AbjBBNvG (ORCPT ); Thu, 2 Feb 2023 08:51:06 -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 0AFD18FB57 for ; Thu, 2 Feb 2023 05:50:53 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id cw4so2018195edb.13 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=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=Ca34ueXSmHC3upOJRvgTjnW/SrRvQSKi+3oAoEeXvCjP6+EU5uH5XFjgmEoiBggsg9 ivodr+g2rXlUixSp1DWBM+xnm/yUa5K5ns+T5JllBKWHj/984fR3tt12s7/UC37P2r60 D3RImndpJjnELvRN+3TQBz+NnQmQgCZsmwCyg4ko8tCTUtoWH57dkcsxIoUJiR1PCB2V YJdcnbRRTn4DYEzoZH/PILrPD9TQjvFBVnsmKbNEcmLiqN6QOLs8Ez/v/cj90wCnhtTH aHgPc0NLZ46iULlmZpkUsWjcJNtYtX1w9zwnT7I9n9TWGVeKqFl7Ij3iocwexiLbxFKt Zp5w== X-Gm-Message-State: AO0yUKVrcxZIw4iVxjoQrBtvC0fJ5XBPopMXx5TnNWqAbRCw30A3hwFB RcN1Fhar9T1cc0uuKp9tyCqDGQ== 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-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 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: 13126111 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 92D87C61DA4 for ; Thu, 2 Feb 2023 13:51:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231989AbjBBNvR (ORCPT ); Thu, 2 Feb 2023 08:51:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232274AbjBBNvH (ORCPT ); Thu, 2 Feb 2023 08:51:07 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B65538F27B for ; Thu, 2 Feb 2023 05:50:55 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id u21so2072517edv.3 for ; Thu, 02 Feb 2023 05:50:55 -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=Q4OS50LlIcdgPUuizvw+H4QXLBJqywa9r9xhIAvbDOstRH1ctSsiUNrDYKpV25dRlF AF+anhSoebGh5BdOVc8ryPIlCGHtmTjqezTNGYWzOE7qWlUf1sT2Qz71TYQ/MQu53k9h Ag/uLp23ds4OOE/ADqd+V8QFhYtxTeZ2ywCjqW7w3WCtfx2xONwxh9a1rfP8nSC6hJrR Qqhr1vJtpRmrXp+0u7b8F8+077Lr9ig4sirnlJOzBjpNchpbLHNGC7GGCafvvnzyHB57 QKOpcI2OcuYDSay9nJXqITTl+YGIkRBH+Oq1bOVn0KRvoIGpsvi+LzTz4rfJnX06BhuP NXuA== X-Gm-Message-State: AO0yUKWpmsZH6xCDFOCsa4nWjbp4yFW893B3CBUDzzTXemuKpqLUBOqL e+fnqdG5IMny1G3qoT0X0GSP1w== 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-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 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: 13126112 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 0DF5CC636D6 for ; Thu, 2 Feb 2023 13:51:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232274AbjBBNvR (ORCPT ); Thu, 2 Feb 2023 08:51:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232305AbjBBNvH (ORCPT ); Thu, 2 Feb 2023 08:51:07 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F78C8FB47 for ; Thu, 2 Feb 2023 05:50:57 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id fi26so2055896edb.7 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=TZl5UJJyD/IjuRmAs1ZgYITvf8pyxSbdC89ESjbsgEIIiuvgGqunW450gRlk/Hu8vt fr8hr8I4GXAeSAbNgrMQvfBM72i5dMwk06uN6w9/WwDJwy6JXQYBfjkdoIZcHedouJPw nZBJSuwlEui2jrR0KJc4WyjpLPjB0GHDQqaWahuigrfTD3jxotn9ipG4+tg8Wv6DRzRm TgYlpj6TP89vUpMZTQSoUeB5minHYDn5w7A5sZclwy95MKoSIju7Wbr3rRcjll8aCQab HaqFLy7aGqmHypCgbk7cGAbcvtg9rpq6eB9w3JklqDSx/ufxigtneCfCl9ZRt5yW3zFP Ql3A== X-Gm-Message-State: AO0yUKXryGyImoWabAOLh8TnPXsex5vvLUBI/9i542w3VnIrnlG69EOT Qc8RegFlsJoYGwb96FGGUvyNHQ== 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-arm-msm@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);