From patchwork Wed Oct 13 10:55:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555561 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF1B6C4332F for ; Wed, 13 Oct 2021 10:56:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACB79610C9 for ; Wed, 13 Oct 2021 10:56:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232243AbhJMK6X (ORCPT ); Wed, 13 Oct 2021 06:58:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231597AbhJMK6F (ORCPT ); Wed, 13 Oct 2021 06:58:05 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C535C06174E for ; Wed, 13 Oct 2021 03:56:02 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id pi19-20020a17090b1e5300b0019fdd3557d3so1921116pjb.5 for ; Wed, 13 Oct 2021 03:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fRXyuG4K4UcrJ1NjhumTmbpE2063xuupe5W8qPOe4Yw=; b=v48ZoqGZB7XBFy4q3wSP+rpZ4GvKK73lK9ne2goyM63IJhmVaW5O+PoWh7UvL/I0KF B/omhA9z9YSDHUDu9EgRKqapA+FW9CNquP/e/jP4UzDiEM+pNTbxvlcfh81uVJMyXuSD SkcPYHLqv4TZDCgfVWQbxsddBJaqZZe3Q4HMM92J8rMn/j6k3pBZAKREGSyU3ho9zES0 G1Tzh47VXyZpu7Sw+vsvfjDudRSo19tdatCXJ65NuQ3rTXIevmofT9i9cWaRqyEmYUPF Fs0pBL7u3wfYkH1fHRD2ImyOb6zybW+SiEMQUD+SdeSofu/hU3YgvxJ7HYKj97kpuwhZ iuGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fRXyuG4K4UcrJ1NjhumTmbpE2063xuupe5W8qPOe4Yw=; b=Fbw2UyCo29lLzhqeJVYirV79x6BMn+DKp93lwmnhOu89g1LAbjRZWBZOF00ADNiCXK OkCPBILmUX5w/qXK3ugCQgdPxhKCsMhg/sY1EtoSJDpJp+DvXhC8NkCyo0g31kc/m2B5 0jeZuIy8jZfO8tqQAcA16BSkwJBI1EFCwczNZ4ZXGy34ooyEC0QebyZqAtHDefajWomQ 5INp5uOSUwpduaH0VxgIl3Gdf4TJvH2CtAFIHzcQZAaGP7vnJvb14VEb5pOgFT4pYOKL iWDiCMlym7TznAlsgFdP9QdeujWWJJBSGGZd/fhhSklWdqD62jXKRMHJdfo1qpNweOCH YmNg== X-Gm-Message-State: AOAM533A84o13gbPdaomerhMcP/KC8HwthlMX0wKAt/uLDIN54QnnDX2 3mIxUT4cEZP0oevORYtls96FqAJc/OjlzA== X-Google-Smtp-Source: ABdhPJxmJGsHbblFvtmcLLVBxQ5sWiyEypF+LZjUgEWQKbSz5GPyxK01w4yn2G1a1clXidIKtRMpGg== X-Received: by 2002:a17:90a:1504:: with SMTP id l4mr12586375pja.181.1634122561455; Wed, 13 Oct 2021 03:56:01 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:01 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 01/20] arm64/dts: qcom: Fix 'dma' & 'qcom,controlled-remotely' nodes in dts Date: Wed, 13 Oct 2021 16:25:22 +0530 Message-Id: <20211013105541.68045-2-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Preparatory patch for subsequent patch in this series which converts the qcom_bam_dma device-tree binding into YAML format. A few qcom device-tree files define dma-controller nodes with non-standard 'node names' and also set the bool property 'qcom,controlled-remotely' incorrectly, which leads to following errors with 'make dtbs_check': $ arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dt.yaml: dma@1dc4000: $nodename:0: 'dma@1dc4000' does not match '^dma-controller(@.*)?$' $ arch/arm64/boot/dts/qcom/sm8250-mtp.dt.yaml: dma@1dc4000: qcom,controlled-remotely: 'oneOf' conditional failed, one must be fixed: [[1]] is not of type 'boolean' True was expected [[1]] is not of type 'null' Fix the same. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index d2fe58e0eb7a..7b6205c180df 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -200,7 +200,7 @@ cryptobam: dma-controller@704000 { clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <1>; - qcom,controlled-remotely = <1>; + qcom,controlled-remotely; qcom,config-pipe-trust-reg = <0>; }; diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi index db333001df4d..99668e84953e 100644 --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi @@ -212,7 +212,7 @@ prng: rng@e3000 { status = "disabled"; }; - cryptobam: dma@704000 { + cryptobam: dma-controller@704000 { compatible = "qcom,bam-v1.7.0"; reg = <0x00704000 0x20000>; interrupts = ; @@ -220,7 +220,7 @@ cryptobam: dma@704000 { clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <1>; - qcom,controlled-remotely = <1>; + qcom,controlled-remotely; status = "disabled"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 52df22ab3f6a..390468e1b62e 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -2686,7 +2686,7 @@ sdhc2: sdhci@74a4900 { status = "disabled"; }; - blsp1_dma: dma@7544000 { + blsp1_dma: dma-controller@7544000 { compatible = "qcom,bam-v1.7.0"; reg = <0x07544000 0x2b000>; interrupts = ; @@ -2743,7 +2743,7 @@ blsp1_i2c3: i2c@7577000 { status = "disabled"; }; - blsp2_dma: dma@7584000 { + blsp2_dma: dma-controller@7584000 { compatible = "qcom,bam-v1.7.0"; reg = <0x07584000 0x2b000>; interrupts = ; diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index 34039b5c8017..a46838f1e310 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -2187,7 +2187,7 @@ blsp1_i2c6: i2c@c17a000 { #size-cells = <0>; }; - blsp2_dma: dma@c184000 { + blsp2_dma: dma-controller@c184000 { compatible = "qcom,bam-v1.7.0"; reg = <0x0c184000 0x25000>; interrupts = ; diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index b3b911926184..72ec48c4e03c 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2312,7 +2312,7 @@ ufs_mem_phy_lanes: lanes@1d87400 { }; }; - cryptobam: dma@1dc4000 { + cryptobam: dma-controller@1dc4000 { compatible = "qcom,bam-v1.7.0"; reg = <0 0x01dc4000 0 0x24000>; interrupts = ; @@ -2320,7 +2320,7 @@ cryptobam: dma@1dc4000 { clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <0>; - qcom,controlled-remotely = <1>; + qcom,controlled-remotely; iommus = <&apps_smmu 0x704 0x1>, <&apps_smmu 0x706 0x1>, <&apps_smmu 0x714 0x1>, From patchwork Wed Oct 13 10:55:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555563 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9A76C433FE for ; Wed, 13 Oct 2021 10:56:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4CD060FDA for ; Wed, 13 Oct 2021 10:56:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231623AbhJMK6Y (ORCPT ); Wed, 13 Oct 2021 06:58:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232211AbhJMK6O (ORCPT ); Wed, 13 Oct 2021 06:58:14 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19A00C06176A for ; Wed, 13 Oct 2021 03:56:07 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id x8so1529982plv.8 for ; Wed, 13 Oct 2021 03:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LL9CpSaKrwIGmzf5gUizL7uHqJVR8v2f7iF2al5I2gY=; b=mxHA9h0fvl0IV6lqG/ITsAIHHgpNrWhGbL8wzkufFz91H7ItJqO3eFvtZeFcBE25Me eXLDK86XM4C6uCH99pHIDHinaiwO8GzO4sT08bzTzTqnsETHwZupKrAaMjl6jbTMzMLa gZbL+YAz5ZvaJ5b1ulkwfbogdKK938pwYvQbZ9TcKLC2IHlSo6UYfoI9y9PuhosQz8Fd TRrwI1Ir8CWcFlUZvdmt3HlssDOURZXFSx0ZoNWvb3DoKQX+83yVF6s8NoWY4z3VuE6f +pD0hd5UY1Xjm7KUtAtLyjW7kTAucKEgBfT/qjX2CA79qg7G7Gk0CP/4cOb90oEt6oyT E9aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LL9CpSaKrwIGmzf5gUizL7uHqJVR8v2f7iF2al5I2gY=; b=M5EcBiI2DDEE59KQ7BZ0C6Ffdjhwwhm/OSjXXbeAIt38beEczqD+GD3ZvQcHTOiPd2 eKUjR8sNeSzzw88kAszcxbpEC/aXddR5UxpMUKKPIMu/3qDBkHT87Nzej/ipJ4GjBZeU 28uz8jvhs0UuUNKok3Vwjv3wUgRGdcB1pZb/fV7b4d+2UUMPxzh8lhhgPCN6wOdJfV73 Rk0QJ1BjxIm/9AEUxF1zODNt02/2ZOQtNINmqT/9D9+AlkvrVWoCGTehSSVNfwNoXvMX 4sPy3FG6hPC54R6zHcZGhj3ep/J8h48ln7ZsA+b84a9sNhybT1/vT8r5d1HCE6+j26/+ Sigw== X-Gm-Message-State: AOAM533wWrmdJ0GtLOPCelKsT4yIj9Wa7QyCeCizwwUowk9lXJF0aYsu IpiTe5IsIaPH78Td2EIq1MUerzm+ROC+gg== X-Google-Smtp-Source: ABdhPJxpVn6s06BcFRv7MNatv5Gi4Lr15alhu+KdWwOD+0qh74bxiXioA5VZD8McVcgCoxmkDnyJOg== X-Received: by 2002:a17:90a:5108:: with SMTP id t8mr12571728pjh.201.1634122566438; Wed, 13 Oct 2021 03:56:06 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:06 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 02/20] arm64/dts: qcom: ipq6018: Remove unused 'qcom,config-pipe-trust-reg' property Date: Wed, 13 Oct 2021 16:25:23 +0530 Message-Id: <20211013105541.68045-3-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 'qcom,config-pipe-trust-reg' property doesn't seem to be used by the qcom, bam_dma driver, so remove the same from 'ipq6018' dts. This is a preparatory patch for subsequent patch in this series which converts the qcom_bam_dma device-tree binding into YAML format. Without this change, 'make dtbs_check' leads to the following error: $ arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dt.yaml: dma-controller@704000: 'qcom,config-pipe-trust-reg' does not match any of the regexes: 'pinctrl-[0-9]+' Fix the same. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index 7b6205c180df..6a05ee82547f 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -201,7 +201,6 @@ cryptobam: dma-controller@704000 { #dma-cells = <1>; qcom,ee = <1>; qcom,controlled-remotely; - qcom,config-pipe-trust-reg = <0>; }; crypto: crypto@73a000 { From patchwork Wed Oct 13 10:55:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555565 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C674CC433F5 for ; Wed, 13 Oct 2021 10:56:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD476610D0 for ; Wed, 13 Oct 2021 10:56:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232206AbhJMK61 (ORCPT ); Wed, 13 Oct 2021 06:58:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbhJMK6T (ORCPT ); Wed, 13 Oct 2021 06:58:19 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD247C061776 for ; Wed, 13 Oct 2021 03:56:11 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id g5so1553326plg.1 for ; Wed, 13 Oct 2021 03:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YqRxF9ZTUxEEoaYTLJmLJv0gPuDDV1X9LB6m0mfziFw=; b=u1NY/FtKqX9+bZ5mB5nQyKPwhE2B+7rt3Ya3tXX7L26u0BeCYgaufRt//+Vq1XRQyU tljbLydbOzIwyOj9yYe0xxukP7tBcLYPMfhKrxw37sa78nvQpoTD7cXq/ll5hvXc3A9u 7PUtxD28f00LUD7T6dkDPk1oWWmHo4GxHRztfgtPS3I8e4UIsCLR5ToVm2/BvGHLSQIN ep4rEMbCitsfxdGPSLfxGdZkIuanMeEswAK4gFA4fi9hga+l/o1AIHevK8mk+QghQDxC 0Ld3oo7CVSHDFsjz0F4PhR+cIwFeJLpWaFMiKAtVlIRLLK9elWejog5Haam4BoH/AGQZ I5Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YqRxF9ZTUxEEoaYTLJmLJv0gPuDDV1X9LB6m0mfziFw=; b=sYZw4nJAA0Z0Tbj4dgDfrksPf0iiF/dD8n3kFRQiFhsp4vPgfbxHNr1g9kCI1q3Dt+ Bx+sZKKzRhqUGDrVxyjnWARCxv2IlzGjRnN7ovUUM9GH2jPkmGj7+9azujcAphtWYI1x QJ3rvY+bGOWu7Zjoh+rUDBpTwer49vWhRv2CoQl0XKYa6PpfngRYQLFuPHjftXYkhswt /Go/0+UOLOTDIuyJKq3pLLDnN/IlvO77v8Ih8jEjR7w/z3+fItX42CtUhAq+hYSO51Hj EV8X2osXG2PLFNe/StdJEp+cnSZlrE2lw90EL8Lb+5rEFa6L8ke6Bkc050Pe2YLd/w0/ BMwA== X-Gm-Message-State: AOAM531TiWlfgSlKNiyOyv9ylNxWHKt37BKyo6spOa+8/o4+DogPAoq5 2fw725rpslODtatynmHYtExqkitctfgJoQ== X-Google-Smtp-Source: ABdhPJxhXjUdadL1vOJu0nmmuB6U/wMetuPlkzlUFn6z3zR6qp4XVxt/116l5JgRVwlTAAwZohz9xQ== X-Received: by 2002:a17:902:b60b:b0:13e:dfc0:139 with SMTP id b11-20020a170902b60b00b0013edfc00139mr35423858pls.80.1634122571016; Wed, 13 Oct 2021 03:56:11 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:10 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 03/20] arm64/dts: qcom: ipq6018: Remove unused 'iface_clk' property from dma-controller node Date: Wed, 13 Oct 2021 16:25:24 +0530 Message-Id: <20211013105541.68045-4-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 'iface_clk' clock is not used by the qcom, bam_dma driver, so remove the same from 'ipq6018' dts. This is a preparatory patch for subsequent patch in this series which converts the qcom_bam_dma device-tree binding into YAML format. Without this change, 'make dtbs_check' leads to the following error: $ arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dt.yaml: dma-controller@7984000: clock-names: ['iface_clk', 'bam_clk'] is too long Fix the same. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index 6a05ee82547f..55c961b5f1ab 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -346,9 +346,8 @@ qpic_bam: dma-controller@7984000 { compatible = "qcom,bam-v1.7.0"; reg = <0x0 0x07984000 0x0 0x1a000>; interrupts = ; - clocks = <&gcc GCC_QPIC_CLK>, - <&gcc GCC_QPIC_AHB_CLK>; - clock-names = "iface_clk", "bam_clk"; + clocks = <&gcc GCC_QPIC_AHB_CLK>; + clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <0>; status = "disabled"; From patchwork Wed Oct 13 10:55:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555567 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE98AC433F5 for ; Wed, 13 Oct 2021 10:56:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B7FDF610E8 for ; Wed, 13 Oct 2021 10:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231533AbhJMK6c (ORCPT ); Wed, 13 Oct 2021 06:58:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232851AbhJMK6T (ORCPT ); Wed, 13 Oct 2021 06:58:19 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC5F7C061753 for ; Wed, 13 Oct 2021 03:56:15 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id om14so1881012pjb.5 for ; Wed, 13 Oct 2021 03:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B378ZdVVtjD4xYBqAMBHoetTzP75Wth9+eLC8a1D4q8=; b=Y9uMELLDjzHAqYLrSPszp0KriFvDliJZS38cdn1i/uZmUMvfcEhgnTxfK6dRDQKmB1 ffC3BCC0nePccJLA63Oe9QPY605rpe8z19o/BWHQTgfMYzFEn3LAIVqNvXIxxxKNjkAH AnlpJoiqjK2qbxWzhlPSmyoA5xtwDv75hy4gEUhn1YgAOxBinzXt/BcJdDCEfN+mRX9H EzsW/tgDlZ3onrRMeJ7KVoFAqEWHA1efGs9CYO/yoSMVshNms5A0+I6QwaVTGAxiV6BJ yzEiyJjkh9guJBWhglCX3xmOcOKhFCj9/8ipViZHeiExgLmFcm9PZMVPz0EUAodbS70Y X2pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B378ZdVVtjD4xYBqAMBHoetTzP75Wth9+eLC8a1D4q8=; b=3K3btHnEVNnP0bmXeqhfdwg0RePe+ZCHTmq4zbvCum3I7dHlgyx8wemB9nBVafpxuw 819BSDnGw1NGW898lDhrJAdCaYivrWL0xh8SlUAK1ILwtCJ8+nlpO2dPL2qithqmGjtZ Malc96pQV3LA329vAK2TLkjYH3z8QkKEIk+fDT1eFNJekR0nq/HKzXNMgim6pPIghpVj X7GMK7IaPx1QdVY4AzN8oBnYZX+z87AWN5Zi0OI2h6HfVBJMxoFQoThbpgrBCdQA5QOD lG8wZMlV8kezQrLwukYTxUjbq4IMMWpAgbYwJ/vvRUEfJBX7ZnHBu/LZTcPTW+Tn8Rgc sUEg== X-Gm-Message-State: AOAM531PmPjI304tD/qBCQ7Ed8ngEkN76fkBHH1PNp7+N2J43TcXcbr7 xJ0nXvxLnIbrozk9gfPCLASUBcV+FCndpA== X-Google-Smtp-Source: ABdhPJwKFYRHSWkB4YIFoNRT/vuVna5d+mOQWaMtuHWzoDzQJ0YOzK8zOS1uz9pL45KN1OPkT7mtQA== X-Received: by 2002:a17:90b:3581:: with SMTP id mm1mr12516617pjb.93.1634122575175; Wed, 13 Oct 2021 03:56:15 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:14 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 04/20] dt-bindings: qcom-bam: Convert binding to YAML Date: Wed, 13 Oct 2021 16:25:25 +0530 Message-Id: <20211013105541.68045-5-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Convert Qualcomm BAM DMA devicetree binding to YAML. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- .../devicetree/bindings/dma/qcom_bam_dma.txt | 50 ----------- .../devicetree/bindings/dma/qcom_bam_dma.yaml | 89 +++++++++++++++++++ 2 files changed, 89 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/dma/qcom_bam_dma.txt create mode 100644 Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt b/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt deleted file mode 100644 index cf5b9e44432c..000000000000 --- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt +++ /dev/null @@ -1,50 +0,0 @@ -QCOM BAM DMA controller - -Required properties: -- compatible: must be one of the following: - * "qcom,bam-v1.4.0" for MSM8974, APQ8074 and APQ8084 - * "qcom,bam-v1.3.0" for APQ8064, IPQ8064 and MSM8960 - * "qcom,bam-v1.7.0" for MSM8916 -- reg: Address range for DMA registers -- interrupts: Should contain the one interrupt shared by all channels -- #dma-cells: must be <1>, the cell in the dmas property of the client device - represents the channel number -- clocks: required clock -- clock-names: must contain "bam_clk" entry -- qcom,ee : indicates the active Execution Environment identifier (0-7) used in - the secure world. -- qcom,controlled-remotely : optional, indicates that the bam is controlled by - remote proccessor i.e. execution environment. -- num-channels : optional, indicates supported number of DMA channels in a - remotely controlled bam. -- qcom,num-ees : optional, indicates supported number of Execution Environments - in a remotely controlled bam. - -Example: - - uart-bam: dma@f9984000 = { - compatible = "qcom,bam-v1.4.0"; - reg = <0xf9984000 0x15000>; - interrupts = <0 94 0>; - clocks = <&gcc GCC_BAM_DMA_AHB_CLK>; - clock-names = "bam_clk"; - #dma-cells = <1>; - qcom,ee = <0>; - }; - -DMA clients must use the format described in the dma.txt file, using a two cell -specifier for each channel. - -Example: - serial@f991e000 { - compatible = "qcom,msm-uart"; - reg = <0xf991e000 0x1000> - <0xf9944000 0x19000>; - interrupts = <0 108 0>; - clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>, - <&gcc GCC_BLSP1_AHB_CLK>; - clock-names = "core", "iface"; - - dmas = <&uart-bam 0>, <&uart-bam 1>; - dma-names = "rx", "tx"; - }; diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml new file mode 100644 index 000000000000..32b47e3b7769 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/qcom_bam_dma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: QCOM BAM DMA controller binding + +maintainers: + - Bhupesh Sharma + +description: | + This document defines the binding for the BAM DMA controller + found on Qualcomm parts. + +allOf: + - $ref: "dma-controller.yaml#" + +properties: + compatible: + enum: + - qcom,bam-v1.4.0 # for MSM8974, APQ8074 and APQ8084 + - qcom,bam-v1.3.0 # for APQ8064, IPQ8064 and MSM8960 + - qcom,bam-v1.7.0 # for MSM8916 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: bam_clk + + interrupts: + minItems: 1 + maxItems: 31 + + num-channels: + maximum: 31 + description: | + Indicates supported number of DMA channels in a remotely controlled bam. + + "#dma-cells": + const: 1 + description: The single cell represents the channel index. + + qcom,ee: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Indicates the active Execution Environment identifier (0-7) + used in the secure world. + + qcom,controlled-remotely: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates that the bam is controlled by remote proccessor i.e. + execution environment. + + qcom,num-ees: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 31 + default: 2 + description: + Indicates supported number of Execution Environments in a + remotely controlled bam. + +required: + - compatible + - reg + - interrupts + - "#dma-cells" + - qcom,ee + +additionalProperties: false + +examples: + - | + #include + dma-controller@f9984000 { + compatible = "qcom,bam-v1.4.0"; + reg = <0xf9984000 0x15000>; + interrupts = <0 94 0>; + clocks = <&gcc GCC_BAM_DMA_AHB_CLK>; + clock-names = "bam_clk"; + #dma-cells = <1>; + qcom,ee = <0>; + }; From patchwork Wed Oct 13 10:55:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555569 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87890C433FE for ; Wed, 13 Oct 2021 10:56:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B63D60ED4 for ; Wed, 13 Oct 2021 10:56:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233398AbhJMK6t (ORCPT ); Wed, 13 Oct 2021 06:58:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232217AbhJMK6X (ORCPT ); Wed, 13 Oct 2021 06:58:23 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F15AC061766 for ; Wed, 13 Oct 2021 03:56:20 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id kk10so1914537pjb.1 for ; Wed, 13 Oct 2021 03:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i9oPzVwWCm9JuYn8EJwbsDpWxM8JS5HRJn2O4LrL//g=; b=gfbku9/ujExwMth0d/hbC+Oym84zjb6RGPTznm25hHga2ydITxJoDeh6PxJCmMzq8V sWQWDWLB8nfb8Rbz/JU3z1hme4wJ/FnObAsx6T16DF5483rgek6SJbN+H8MaFGSmAexS vBSfCwc8peqsS1xb2vAyIKM6KPW3zKwUpyXaPvdwhBvc78n9dPNt1aQp+vzVj3p9bxYJ 1S9JRU+H6wONG5yhKgTgEP+JQZqj/B0ITbuauf+EotrebGmpbMVKd03uxSSFLQDI+osx rR3gJMdk2IvhGBuQro2FWAZtsF0WITrAYkL/ieNw9VMvdTs6hxjiVIN4kN7ysRMhm+2U W7sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i9oPzVwWCm9JuYn8EJwbsDpWxM8JS5HRJn2O4LrL//g=; b=Wd6/ugNXEbHLe/+tPhDELl4G+63lX2jIgGeuCXI19bLVUaT5Qr2nCP0pHM0rwI8ZCR U0v6Gn3IPusx17bfXZsFhaCECeqU0c1RX12WAUXHJwEr2FTVs68bOKFiuWBxSp37/daL gLDhN8uORmQVhQInCXh9qp0IJZ2eRZ26RC2JSB/n9YrA+jCjXyT31774LhKW1nLQLHR9 FSWtHsH2m9L3emKptvEjxdhCr/kcU+73Tv+VOCWrAGfgoE7yIePfUlM59jj5RHBECyXe qpxVDq80e+YEEY00+KBGdVkZA1e0cx7iRrE88cB3bVGXJGmyQ61qcLNbi59hUCkYh6hi 7nCA== X-Gm-Message-State: AOAM532LgJbHNvp0qd2QzGxY5ziFXPvpRbvqsVON4ngFfvgQAsq7ziGl CQjrUMQqiDrxJiVfbcbWBXusxFY/HPkf/Q== X-Google-Smtp-Source: ABdhPJwPSWXpbxfjpaz/1Ak368nKLHOPQ75ESjdVq9dARdEytxAMSjsiYy7Z2vm6AUbSSSkceef0rQ== X-Received: by 2002:a17:90a:4814:: with SMTP id a20mr12550420pjh.154.1634122579365; Wed, 13 Oct 2021 03:56:19 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:19 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 05/20] dt-bindings: qcom-bam: Add 'interconnects' & 'interconnect-names' to optional properties Date: Wed, 13 Oct 2021 16:25:26 +0530 Message-Id: <20211013105541.68045-6-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add new optional properties - 'interconnects' and 'interconnect-names' to the device-tree binding documentation for qcom-bam DMA IP. These properties describe the interconnect path between bam and main memory and the interconnect type respectively. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml index 32b47e3b7769..602e68df971f 100644 --- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml +++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml @@ -45,6 +45,14 @@ properties: const: 1 description: The single cell represents the channel index. + interconnects: + maxItems: 1 + description: | + Interconnect path between bam and main memory. + + interconnect-names: + const: memory + qcom,ee: $ref: /schemas/types.yaml#/definitions/uint32 description: From patchwork Wed Oct 13 10:55:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E737CC433EF for ; Wed, 13 Oct 2021 10:57:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CCDFF60ED4 for ; Wed, 13 Oct 2021 10:57:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229912AbhJMK7H (ORCPT ); Wed, 13 Oct 2021 06:59:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232977AbhJMK6i (ORCPT ); Wed, 13 Oct 2021 06:58:38 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5248FC061773 for ; Wed, 13 Oct 2021 03:56:24 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id l6so1522921plh.9 for ; Wed, 13 Oct 2021 03:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z2sBrvxA3Mihi2vqUGXbJq+xZIOpCjvkxgHKQyKWO9M=; b=dLxvEsOxnAJ/yiZvhLJAWdzUsjZx4F/hO8SG55sjqC0uoMeR5cKq8CRX6rctKV7T67 Jnys6dAYsj5lAOLQp7uBRdoyWZsJvcC9PIimn/onluhCZRb2JuuEotwod62vfk2svJN0 FYD3mJgXEgaXBT/qqliSdkQDC73Kr5MPVt02l+0OE1aVwSdKU80Nrd9auYlbcoMlWXPg dW+FpGdBF+SjX9kHvmUMPAfpOKCkKP41ROJmArpxZ/8LzolH0WeLVXrdQXVQ50Mhx311 fCDBbsAvrNH63RX3hSSaPtxGTzzdqYWlskRYVOe+Pe3rxCTPoONuN/u0ax2AgjASAjCG 5z9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z2sBrvxA3Mihi2vqUGXbJq+xZIOpCjvkxgHKQyKWO9M=; b=QJN2PmLqq6Rfoi0xbT+lAEIVnQx3gbWu1nZHc+dNY7P3UzaYqca7p26skfDzVBRAKf put+p5CK59Df8rI90Q9Mxazyw065ojowe6ozg2lYr7lALtD6nfDvTksx4vtPpMJgfPls LeIkw5LMOv/gnarqLYaQ6zWklXWfZLEn2+hlMMDGRn5ZicJQ5DM2kuY1eJEf3u8vqZaU GGtTaz4PnwT9OZNeYVTLD60D/tnKj5zx6PYcNdf6uNYYq5wNLn4ZPzPMgM8iU5bqVdEM 9/F4ZRzKBEzQaMqo/E1LhOdtMq8z1WHVeLqKBMqX9kehaYNEfxYZjoNlPgFK63oLhFN6 84gQ== X-Gm-Message-State: AOAM533v1fc1acNvTN0dFOfybTXL/MkGQCE5E2spNB/mXmYhOJv5HFuk DPzDxfWLhOgvPuqgVajW6gym0jT1CPgKEw== X-Google-Smtp-Source: ABdhPJzS5MsQJ5G6pY/x5ilWe9j0Ca4cdetOxPcEMbiTwTVvfiYrezOs7OgcrbQRhYkzYJDvZNyTdw== X-Received: by 2002:a17:90b:4d8e:: with SMTP id oj14mr12663660pjb.160.1634122583633; Wed, 13 Oct 2021 03:56:23 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:23 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 06/20] dt-bindings: qcom-bam: Add 'iommus' to optional properties Date: Wed, 13 Oct 2021 16:25:27 +0530 Message-Id: <20211013105541.68045-7-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add 'optional' property - 'iommus' to the device-tree binding documentation for qcom-bam DMA IP. This property describes the phandle(s) to apps_smmu node with sid mask. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- .../devicetree/bindings/dma/qcom_bam_dma.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml index 602e68df971f..7c046a281fcd 100644 --- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml +++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.yaml @@ -53,6 +53,12 @@ properties: interconnect-names: const: memory + iommus: + minItems: 1 + maxItems: 8 + description: | + phandle(s) to apps_smmu node with sid mask. + qcom,ee: $ref: /schemas/types.yaml#/definitions/uint32 description: @@ -94,4 +100,8 @@ examples: clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <0>; + iommus = <&apps_smmu 0x584 0x0011>, + <&apps_smmu 0x586 0x0011>, + <&apps_smmu 0x594 0x0011>, + <&apps_smmu 0x596 0x0011>; }; From patchwork Wed Oct 13 10:55:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDB5BC433FE for ; Wed, 13 Oct 2021 10:57:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7F8C60F21 for ; Wed, 13 Oct 2021 10:57:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232260AbhJMK7M (ORCPT ); Wed, 13 Oct 2021 06:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232029AbhJMK6t (ORCPT ); Wed, 13 Oct 2021 06:58:49 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE6AEC06177B for ; Wed, 13 Oct 2021 03:56:28 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id e7so1959215pgk.2 for ; Wed, 13 Oct 2021 03:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yw+NaHmS2OviUEGIWWfNtsmzD5nYySB6AIlogP5a/cQ=; b=NHZlgl1GO0cd+Qmy2aII0kIzz8l5igxZ/oBSCb8LIlRTi4oglpg2DHBYrw7iJd6wfj uHiagAUBP7IZCEQPqhL/EfyQtq5igzIaa3ULO8k4gCzyxoQ4dALhJ95/48z2Cyx14+WQ m0GA1f670VwFJju8RMabpf7IKbitlkrWmQgifeFViFFK7MtPKD2gFeZEeUkQOF4GEGGQ DyVWW1B2tlkKzr8Rtoj+04ThkYU95WXfjm1fVVtD9Obw+d/cFcpq/TguTIX1G1jGBRFn WSH7GQ981etr9pv3klieXiMzITqXlpISAleuWF/fTMoP9C3t1bV8i9FMJ/nJTQ5ya/Dj 9scw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yw+NaHmS2OviUEGIWWfNtsmzD5nYySB6AIlogP5a/cQ=; b=DpV51qRlutl02Ust0BzzvF1P20Qe2+0LIFigv/iw3n39BhuRBC8Cpm8NhuE30Ys3rq 39H5S/rY1arwyBHD9B5Z75hlfSMcArNU7Xu7RX7c1qJbaEZZmXhopxtZP15+AQTyiLiW t3UTmybVxvkOL1RorDd7kMw34VrrJ/g/RMhpuEzVnuIon3fvZQeX4vI7dpP4Y28WBtNc MZIpZtTfhyKuMd85JAuf/rASMgjeoYtVCGnuk4bsBGcpYSOdo8/ZtoIAOns2PeKpGNeH 4nHu5nojQfiG9VQbJfRkpD5v6o9NPUUt8dqIKMAcFDkcgUxvtLCil729BvVn2do2Hzqx nI3A== X-Gm-Message-State: AOAM533nyDDW8b1WrUryKoBEXUDqgl1W9VfwEr7pZcLieekv/HWnCOfI fffZ+9U7TPoy+ZVZi7LeZlfOi2334m4EDA== X-Google-Smtp-Source: ABdhPJxzqL4Oa7ZbmxyxpW5LGLwTGJW1GLlz9jUKbAzBuQsfjVU/qIuo1CoqarWf7dm+D5vG1hzdSA== X-Received: by 2002:a63:f313:: with SMTP id l19mr27316800pgh.40.1634122588092; Wed, 13 Oct 2021 03:56:28 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:27 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson , Rob Herring Subject: [PATCH v4 07/20] dt-bindings: qcom-qce: Convert bindings to yaml Date: Wed, 13 Oct 2021 16:25:28 +0530 Message-Id: <20211013105541.68045-8-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Convert Qualcomm QCE crypto devicetree binding to YAML. Cc: Thara Gopinath Cc: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Bhupesh Sharma --- .../devicetree/bindings/crypto/qcom-qce.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/qcom-qce.yaml diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml new file mode 100644 index 000000000000..b7ae873dc943 --- /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 tx dma channel. + - description: DMA specifiers for rx dma channel. + + dma-names: + items: + - const: rx + - const: tx + +required: + - compatible + - reg + - clocks + - clock-names + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + #include + crypto-engine@fd45a000 { + compatible = "qcom,crypto-v5.1"; + reg = <0xfd45a000 0x6000>; + clocks = <&gcc GCC_CE2_AHB_CLK>, + <&gcc GCC_CE2_AXI_CLK>, + <&gcc GCC_CE2_CLK>; + clock-names = "iface", "bus", "core"; + dmas = <&cryptobam 2>, <&cryptobam 3>; + dma-names = "rx", "tx"; + }; From patchwork Wed Oct 13 10:55:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E968EC433EF for ; Wed, 13 Oct 2021 10:57:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D66F2610A1 for ; Wed, 13 Oct 2021 10:57:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232278AbhJMK7m (ORCPT ); Wed, 13 Oct 2021 06:59:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233854AbhJMK66 (ORCPT ); Wed, 13 Oct 2021 06:58:58 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEB26C0613E7 for ; Wed, 13 Oct 2021 03:56:33 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id g14so2131457pfm.1 for ; Wed, 13 Oct 2021 03:56:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yng5eTw4n0HbKQV0Xcv/zVYYMU50wsVq8rLsKT3wyb8=; b=szAdfCtZjTXtVtUeM38ldIve5EF5/0Br7s8W9cXxA9prF7ZYrNeqv8KbrhJPl0wM1o gU5pe2tTYCljGIJIf2d6lDfa8pYlMCM3WwHPA0McScpbpHJMLI/cne7dylw83Q5brGiv Liqx0mwINVuSCL+UM0cunoJgEackJehBKyGEs4czcLlSkn9lwfBAAuY2LkenjkpEha5o xsEdKmkLs/vzHhVPRvvjYR7yWUvBBN8vEEZ6lPYZoZwwWFzFtmzKsSdQ5Q++auOH4/wj 3nlH7ULPuPiAKzy0LLxS0CHvWfYTM5lfmC1AlM6J42a1a7m9eCIeqBpT8bGNirAMb+SH AHrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yng5eTw4n0HbKQV0Xcv/zVYYMU50wsVq8rLsKT3wyb8=; b=r1uKU5vnJ6uneknNjDUmI7KwRXnZrts0l3Tz8umGtXwJApy9rR0VgkpbMq8oduB85V 4yWMLGDNlXVD5bB1OdmnMlEhrwrTst1JZqipbadw5Ksl5sbstTiakPMS+ReqlG5+dcPB J3MOPUxNKfXZxIZR0pPczoMFOU5rngCFh5fu+cKUUy12ogdIk2N2ST68otewyQ4QmD8b 2PAVfun44rvwLraGYP9J0P44rpxTVzkK/Usi/ljtwaxH9/61K2nCliuZ0t80ljHRNXhS sEw/zfJOwIBP/C7pcBA1g96gGJkPYVOdfVIqaQzpZZ2joXjhCyZ51gTBerR3pmrH20e8 hRcw== X-Gm-Message-State: AOAM533QhQb0x9PmPwLFvkJtygcQ3odTPoJFws8toxmMxANaYkWgzUJK OHc5je71zBtZhMK52VX2v61Eo8LHMEXD9Q== X-Google-Smtp-Source: ABdhPJwYqosT/5ArpzWpSNWo3I/WZjXdW4f7C8zC1FkxtUmdTuVDdpIyEmleWaacjSPv08d4vT6Fog== X-Received: by 2002:aa7:81c7:0:b0:44c:517f:a759 with SMTP id c7-20020aa781c7000000b0044c517fa759mr36699311pfn.3.1634122592461; Wed, 13 Oct 2021 03:56:32 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:32 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 08/20] dt-bindings: qcom-qce: Add 'interconnects' and move 'clocks' to optional properties Date: Wed, 13 Oct 2021 16:25:29 +0530 Message-Id: <20211013105541.68045-9-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add 'interconnects' and 'interconnect-names' as optional properties to the device-tree binding documentation for qcom crypto IP. These properties describe the interconnect path between crypto and main memory and the interconnect type respectively. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index b7ae873dc943..954f762090f3 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 tx dma channel. @@ -45,8 +53,6 @@ properties: required: - compatible - reg - - clocks - - clock-names - dmas - dma-names From patchwork Wed Oct 13 10:55:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EDA1C433F5 for ; Wed, 13 Oct 2021 10:57:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FBD960ED4 for ; Wed, 13 Oct 2021 10:57:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232088AbhJMK7y (ORCPT ); Wed, 13 Oct 2021 06:59:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231827AbhJMK7I (ORCPT ); Wed, 13 Oct 2021 06:59:08 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD055C0613EB for ; Wed, 13 Oct 2021 03:56:37 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id 66so1934114pgc.9 for ; Wed, 13 Oct 2021 03:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T1vPQV0qYkahKzrrtJ/01RQjfjjhS4pae1ACyI/Og8E=; b=QtFFChBCVKJbBjVREl6Cbomp6VGjcmLbYdGmQB/vFJ4aRhinw2L7mpc3BzmX7YoSeX tfcHVxsPWdJ7YefZ9rflKwQC5yeNzU2mXmzWyXSn7o8t8cnt4A//GhwNPCRMea61VI38 1S6JzFum0ZGSdQ4zKCdWk6s5RfsZXbXdRPosgOW4Nprdpv+iMOXWoHsuEasz7SpaQzZJ 7qOSlhCS72ZgaK3ZNqc+hofdoLd6DPNQSUWPCf77pEAxWtJALG6y+wZVjl7I0sZzMezY XSaoggE+6/+BK6AKyb/BH6ssCXGWuuYOYWLWRV8QQ/J7QUNGzs9j4fNkbCnlxqCbAgeu 6l/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T1vPQV0qYkahKzrrtJ/01RQjfjjhS4pae1ACyI/Og8E=; b=XHKVE7XPY0ws9SY//S72t3xxOOxNzFSBwF2aKHeCnRH4DHsCMMaLdvkGOsQWa65F5f Gh4Rj4YTwoduDIsV4WcgwG/8hjxouGW+PEhBOmvlXwBOOcRNWeNv/3N9YiPT7W/kGXJt us9z+yCNFoH2IV7lEFViUyzrWXBi+bzeIoQCnZUsahKq/ECz2NXNGFUd9cZVIclBtoBR Pi6yJdjlAS6MTkQ1GakW2KB+b3pJFSI+WqWeubs8IjNwkRrl19NeBxng/ajBbInh+2ia 7e8kfB1jkPR5npNvqYWaLnfLqeoRlPOe29xHdIuuETTrI2xgz63a4QhzKn5eUGpF5AKR U1EA== X-Gm-Message-State: AOAM531OJZs3yY49rYhSyf+0jwhv4LSy8o5XKHLP2umDcfl9ZcI+8jLH DZiaL8VeFCe8pcUqELnp7fGRdI0GsqPKvQ== X-Google-Smtp-Source: ABdhPJzuAijvw6u9ng9pTmrZ4h94CJzoLbSo1QOZoyjgmY5sreij4smFSSvzEJuo0l2MVJ3/dL0aRw== X-Received: by 2002:a63:3d4a:: with SMTP id k71mr27435332pga.276.1634122597073; Wed, 13 Oct 2021 03:56:37 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:36 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 09/20] dt-bindings: qcom-qce: Add 'iommus' to optional properties Date: Wed, 13 Oct 2021 16:25:30 +0530 Message-Id: <20211013105541.68045-10-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the missing optional property - 'iommus' to the device-tree binding documentation for qcom-qce crypto IP. This property describes the phandle(s) to apps_smmu node with sid mask. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Reviewed-by: Rob Herring --- .../devicetree/bindings/crypto/qcom-qce.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index 954f762090f3..1134899b422f 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -32,6 +32,12 @@ properties: - const: bus - const: core + iommus: + minItems: 1 + maxItems: 8 + description: | + phandle to apps_smmu node with sid mask. + interconnects: maxItems: 1 description: | @@ -70,4 +76,9 @@ examples: clock-names = "iface", "bus", "core"; dmas = <&cryptobam 2>, <&cryptobam 3>; dma-names = "rx", "tx"; + iommus = <&apps_smmu 0x584 0x0011>, + <&apps_smmu 0x586 0x0011>, + <&apps_smmu 0x594 0x0011>, + <&apps_smmu 0x596 0x0011>; + }; From patchwork Wed Oct 13 10:55:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555579 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34119C433EF for ; Wed, 13 Oct 2021 10:58:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1AD3D61053 for ; Wed, 13 Oct 2021 10:58:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234186AbhJMLA1 (ORCPT ); Wed, 13 Oct 2021 07:00:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233571AbhJMK7h (ORCPT ); Wed, 13 Oct 2021 06:59:37 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A76FC061786 for ; Wed, 13 Oct 2021 03:56:42 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id s75so1959042pgs.5 for ; Wed, 13 Oct 2021 03:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/pyODqkukGQl+Vrz63im0QcSLiwmTtjxEqIvcDs/jLA=; b=fxJ57WNBEvlRBn8ueXr+2xSkBYKkXRBbUZ8oEsti3BUMi7DFeBvCF9aLyAFXreheyb mRMoBWBGSjTdQwdpSs//QcHzHuYE8RYCZBOd+6a9lW1D/TWMFx2V0MB7mIyizklotPBC 6I+DbCMR+v47jheHR9Sx7Pd/zWG15E52YNjcPWDlhyONe/3MzXJV2OmmJrmqx70tz16x z77PAaqs7t85yCPrkqIETSEH/Voi3vFjfFdY2XK/etiBPHFpHzYH59ZSM/gWoUnXyJGy C5FC1bt9ZJzA+LwlJ2jUzszIOXnU+ppG1unnMX0qw8iI2RXA2snCt8bE3icH8+elIQKy T9cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/pyODqkukGQl+Vrz63im0QcSLiwmTtjxEqIvcDs/jLA=; b=WhcTV2eibUH4PjDXHAPmkZjk82laJh8SAb0jnste/qj7ub0NiTD8g5BnnTXl9lB4Bx 2JmWnwwItCaq3PgpbmanU3Bori7bRFFriZU66apXYg74Hjmb4Il9ne/IhO71suchjYBq +I2sGsQEKJyXkUJtnvkwua73MLGqWWEFA9uIkiGp1S49WrjoGQ3Tv+ApXy8Ctd3wv8Z/ rtQKGCQDRkeWyoqceGWP7A3vthPbvgiMZYsott5+lrpiBHWYi1eR/+u6KB1/0rJDLyfm lPlnjfDbf9GHy2rVU53/9j1zZTpBYk+0bb3p9U2HMGsC0sU7S5fjR9UulX3X+mABur0h IHew== X-Gm-Message-State: AOAM531B1G8v0ro2pXiKHnck2ee9cwa95leBDFtxQVQNlvx2Z6aT4Zwp 5rMBpoImNQ0ZdpkKs4lLguqYzQMQBYpkgw== X-Google-Smtp-Source: ABdhPJw+kX3sb0c+dDL/I5BYwXxjahp6G5LXHY6eJF0+NW1a3wwi9tjyNYU+5+oYk6UCrPDQ2DRJOg== X-Received: by 2002:a63:6a05:: with SMTP id f5mr27161340pgc.97.1634122601586; Wed, 13 Oct 2021 03:56:41 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:41 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Bjorn Andersson , Thara Gopinath Subject: [PATCH v4 10/20] arm64/dts: qcom: sdm845: Use RPMH_CE_CLK macro directly Date: Wed, 13 Oct 2021 16:25:31 +0530 Message-Id: <20211013105541.68045-11-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org In commit 3e482859f1ef ("dts: qcom: sdm845: Add dt entries to support crypto engine."), we decided to use the value indicated by constant RPMH_CE_CLK rather than using it directly. Now that the same RPMH clock value might be used for other SoCs (in addition to sdm845), let's use the constant RPMH_CE_CLK to make sure that this dtsi is compatible with the other qcom ones. Cc: Bjorn Andersson Cc: Rob Herring Reviewed-by: Thara Gopinath Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 72ec48c4e03c..a301ca7664c1 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2316,7 +2316,7 @@ cryptobam: dma-controller@1dc4000 { compatible = "qcom,bam-v1.7.0"; reg = <0 0x01dc4000 0 0x24000>; interrupts = ; - clocks = <&rpmhcc 15>; + clocks = <&rpmhcc RPMH_CE_CLK>; clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <0>; @@ -2332,7 +2332,7 @@ crypto: crypto@1dfa000 { reg = <0 0x01dfa000 0 0x6000>; clocks = <&gcc GCC_CE1_AHB_CLK>, <&gcc GCC_CE1_AHB_CLK>, - <&rpmhcc 15>; + <&rpmhcc RPMH_CE_CLK>; clock-names = "iface", "bus", "core"; dmas = <&cryptobam 6>, <&cryptobam 7>; dma-names = "rx", "tx"; From patchwork Wed Oct 13 10:55:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555619 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EDE4C433F5 for ; Wed, 13 Oct 2021 10:58:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2912160ED4 for ; Wed, 13 Oct 2021 10:58:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233955AbhJMLAw (ORCPT ); Wed, 13 Oct 2021 07:00:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235111AbhJMK7v (ORCPT ); Wed, 13 Oct 2021 06:59:51 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8CAAC061794 for ; Wed, 13 Oct 2021 03:56:46 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id r2so1931093pgl.10 for ; Wed, 13 Oct 2021 03:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iCNu8a/Ck6W+not26VTW7TSP+LSVtLNhVTLfjLnMwhU=; b=HoODzbnRIqMs1Ucb4XCtlGs7keMM1yHeUyu18/XGO/ra+bc6paP4fL161r3MSmlZDn rEljVOOeubypK7iNjSyCLGAZm1B74B2bAyzRnZ7OrR07FKMQ6qTwjlJAm+LyhuKjhOzf cygF1XzPj0sSCGak+XUsiObtBXF1tIVJoSuVT1gT+wglp9P+zFYOHHy4EEpmsPbvg1HH YuBOYj3oWywvw8/x/Nhdd+OUQws3T0TQ4OKsr6EHgai9w6W6vW23XCvBV1i2UffVVhUv DLqvWgTgvrlLFc+DwztoGE6hcqJI3eeJHu7BEmUmh86xP+4W3bay/HSZQQYvvVZ5lVbo hxxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iCNu8a/Ck6W+not26VTW7TSP+LSVtLNhVTLfjLnMwhU=; b=hBfDitRpq3UHysj6c+kf152J867yMa6FrKunv0wofgASKXX9otoqoZTfMfO+KCIPZJ gYwXJpoC9EcXJPTQLSdR3VVSRZqTbQeXG2E4APp35lynSnzQ1Bqk1uCjXqa17NEK82ez 2Onk56DFK5fZnOKP8T7ADrgCzgcI9juXlSoNCNB+I+dHDhIqrk0TdYx6GhVrr8Sdozku 3pj9vEDngWiLkOmKZhbq7e1p3Gf6moW3AVOfrFzTBjDqB4z1dLgTc3V4PE67d7OFXHQP KGgaN9YPSWDYb6cShbBDNRUbyVWMWkOs/sm+A9WWSHXe3u8ZFJtLuRkMit7hRkRE5wgF qr3g== X-Gm-Message-State: AOAM532Xx+kXHAnnTuKWc9kQqKijsrfLntqBHo6ZvxZ+APbojL97JAGQ lnrrfkCm/9ulP0ZtB0mlxzrZ5IhRTpfA5g== X-Google-Smtp-Source: ABdhPJyVrf9QXDFYJZoXCanBdFDeGInOrKqhxMyoZYEt+QlVUqB6jeCrovsX3MptF1CiAE2Uz3v3GQ== X-Received: by 2002:a62:7cd8:0:b0:44d:4574:ea8a with SMTP id x207-20020a627cd8000000b0044d4574ea8amr6943233pfc.80.1634122606038; Wed, 13 Oct 2021 03:56:46 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:45 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 11/20] dt-bindings: crypto : Add new compatible strings for qcom-qce Date: Wed, 13 Oct 2021 16:25:32 +0530 Message-Id: <20211013105541.68045-12-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Newer qcom chips support newer versions of the qce crypto IP, so add soc specific compatible strings for qcom-qce instead of using crypto IP version specific ones. Keep the old strings for backward-compatibility, but mark them as deprecated. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index 1134899b422f..5ab9335219d9 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -15,7 +15,13 @@ description: | properties: compatible: - const: qcom,crypto-v5.1 + enum: + - qcom,crypto-v5.1 # Deprecated. Kept only for backward compatibility + - qcom,ipq6018-qce + - qcom,sdm845-qce + - qcom,sm8150-qce + - qcom,sm8250-qce + - qcom,sm8350-qce reg: maxItems: 1 @@ -68,7 +74,7 @@ examples: - | #include crypto-engine@fd45a000 { - compatible = "qcom,crypto-v5.1"; + compatible = "qcom,ipq6018-qce"; reg = <0xfd45a000 0x6000>; clocks = <&gcc GCC_CE2_AHB_CLK>, <&gcc GCC_CE2_AXI_CLK>, From patchwork Wed Oct 13 10:55:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95FADC433EF for ; Wed, 13 Oct 2021 10:59:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 76FC260ED4 for ; Wed, 13 Oct 2021 10:59:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234029AbhJMLBG (ORCPT ); Wed, 13 Oct 2021 07:01:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234244AbhJMLA1 (ORCPT ); Wed, 13 Oct 2021 07:00:27 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42876C0617A3 for ; Wed, 13 Oct 2021 03:56:51 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id q19so2113167pfl.4 for ; Wed, 13 Oct 2021 03:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ja8Ba5e+MB0FccnK2ia9/kIYMwLPuC5ly+PwoULA+yo=; b=kosfRirMgfRU5sRJpY3HlVK0GJJrzP/qigr05kNf9c4IxxYVpTgkVTHNu3cEKer6yX AXwglOX6mzTG67IWqMJtKCr7GN21BztiTyt1pklCpcwHGLLMvm3CLXRNLOmleu3IpZ6T Ij4sv7/kzSEQZN0xo7E0tffIsW+aHBshIj+xQMjhzughs9yKwuxjhZgF+PmB8rRpNXkA kW6W0xS05ZHrAWXh65sp26KEg+NrxVaofKvJx099Vxqj3DWgMDJL/5W7e4NrUVCtu0GE ruuuSfNSY8ZoFIAJHAyMFAgk4FHMKl42r/rYL/msilnI7SOrYGEyeU8OaSotYJigLUZP fLUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ja8Ba5e+MB0FccnK2ia9/kIYMwLPuC5ly+PwoULA+yo=; b=AkQTpHwCoW235vmnXyGncKe1M35ah0+Y9Hir7gMXyeaB0AgqDQBO/inQsOCIhS6NfR kI7OcMP0FbIDYsaEQXFH8wCi89wgW2bfJs+QLLoGlR70bJDB/Hcduu+Xb1fxWg5IO5cN N6AtZxnnEL7ZkW5oEJPVrmsDk4HAwD40+l1Pszen6HGeHtVVBuvWlumad+4zPHdWe5kC I/6f5NSX1SgCU7gLOGE2MUIRg57L4BlfuUNv44PQZ69yJGBsNX+Dc7YtOUxtSCa6K5Se GUkSzgVVSq//YzgbmUwZBM2Fat5BYykSYfaJtlcspnF7+lqFvDYl6vp8zEt7OdCbMc8H vapw== X-Gm-Message-State: AOAM531zypy8ydl+HmAsDQqW9hIrt1KhRCfyHnC7hdHKU2vOqDQQNA9g lK5Tg+i+adcCtbZNEsZjnh0Ud0urqc4= X-Google-Smtp-Source: ABdhPJzLvttLnwS3x7bhY4F/1Uzs0rKG+CIh4od0t8aOF1eMTlKKM2zZgXw2oKRqCxFDqckspz+fkw== X-Received: by 2002:a05:6a00:2311:b0:431:c19f:2a93 with SMTP id h17-20020a056a00231100b00431c19f2a93mr37574344pfh.11.1634122610611; Wed, 13 Oct 2021 03:56:50 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:50 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 12/20] arm64/dts: qcom: Use new compatibles for crypto nodes Date: Wed, 13 Oct 2021 16:25:33 +0530 Message-Id: <20211013105541.68045-13-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since we are using soc specific qce crypto IP compatibles in the bindings now, use the same in the device tree files which include the crypto nodes. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index 55c961b5f1ab..2078edd36212 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -204,7 +204,7 @@ cryptobam: dma-controller@704000 { }; crypto: crypto@73a000 { - compatible = "qcom,crypto-v5.1"; + compatible = "qcom,ipq6018-qce"; reg = <0x0 0x0073a000 0x0 0x6000>; clocks = <&gcc GCC_CRYPTO_AHB_CLK>, <&gcc GCC_CRYPTO_AXI_CLK>, diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index a301ca7664c1..575964f80b31 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2328,7 +2328,7 @@ cryptobam: dma-controller@1dc4000 { }; crypto: crypto@1dfa000 { - compatible = "qcom,crypto-v5.4"; + compatible = "qcom,sdm845-qce"; reg = <0 0x01dfa000 0 0x6000>; clocks = <&gcc GCC_CE1_AHB_CLK>, <&gcc GCC_CE1_AHB_CLK>, From patchwork Wed Oct 13 10:55:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 401F8C433F5 for ; Wed, 13 Oct 2021 10:59:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B48E610D0 for ; Wed, 13 Oct 2021 10:59:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233468AbhJMLBZ (ORCPT ); Wed, 13 Oct 2021 07:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232942AbhJMLAx (ORCPT ); Wed, 13 Oct 2021 07:00:53 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42AB9C061771 for ; Wed, 13 Oct 2021 03:56:56 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id n11so1542177plf.4 for ; Wed, 13 Oct 2021 03:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o9zfEpAFP/UtYO0y7HUDPjv1/m+Sw2jOFwXawa2AyNU=; b=U67yZi0auHCjjwva0sTdaEAXRnJdVLTB7DviAcEjVZZdjq75nxAZmhS1lVAqvVDcVc iAg8QW6jDb1uWLzCAJGkmDFWHxJFej3DnyHNoiBuIDNtSfdpjJFLtzB2QtUvomNkQLPn Wc41ka+mc9w/5sEHMAMrZSqMWIHzuS1j3UOQsiQx19OmF045HMV0OmMbXQ8bz7gHIJ7g g2D1AJMtkNtXt43lmUTXZYXeBVFRHRAE6DNe7eq9mm+gxCBC1iWIQnAcfdAMZK0eiYqa y4VrOb1qZ8kwrHOwlguRF3zoYriskjonKpGNBp4fi82gltB6phplWw9fRCOYNtAEsqP9 RVag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o9zfEpAFP/UtYO0y7HUDPjv1/m+Sw2jOFwXawa2AyNU=; b=cEwAv3J6CRzBW3W3gL5Hp9AN57DdLSPD+VgjAK9JQtwdeHiIqZE7Um/Wv7Jfxv9FOF AvvRbpSxaRdoUXxiY3ar4oJbejou22K6dzv+DUUJgWr+wJvEPd7ufSkV1laaIzSZzJJC sDG/n/59mKUZt0rc1ZWT9TrhcWlXF4ZK7S17pYffBdxWKI92jOtpNhUIUcuPaPd/S1y8 ubP0ESopiLyEJWHbg6Mn5O055EhCh3H5x96mXcK2F7A1//V5Q/eZ6DqSiKzSs20a4K1x uSwbqc63gTcaUoIyMZtQli+9QJBPUFHR7mhhs7+xKQ98nexlEHD2S6ysMoP97zikW5XQ BlqA== X-Gm-Message-State: AOAM532CwrdpOnv/5ij2YNzj21skrSLe3LzaS5U6Rv7M0IBBqUtnrGqA tDJj09Enpks1ipDd5dBewfSj5r8LLPKvNQ== X-Google-Smtp-Source: ABdhPJzSZkZzltA3PSyO7hPgqOJaFSQ05pPs1chCE33sM/8dCrpJsCOn1LvXGukyCQOeVX1J8lPekA== X-Received: by 2002:a17:90a:df13:: with SMTP id gp19mr10540172pjb.151.1634122615608; Wed, 13 Oct 2021 03:56:55 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:55 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 13/20] dma: qcom: bam_dma: Add support to initialize interconnect path Date: Wed, 13 Oct 2021 16:25:34 +0530 Message-Id: <20211013105541.68045-14-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Thara Gopinath BAM dma engine associated with certain hardware blocks could require relevant interconnect pieces be initialized prior to the dma engine initialization. For e.g. crypto bam dma engine on sm8250. Such requirement is passed on to the bam dma driver from dt via the "interconnects" property. Add support in bam_dma driver to check whether the interconnect path is accessible/enabled prior to attempting driver intializations. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma [Make header file inclusion alphabetical] Signed-off-by: Thara Gopinath --- drivers/dma/qcom/bam_dma.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index c8a77b428b52..fc84ef42507d 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -392,6 +393,7 @@ struct bam_device { const struct reg_offset_data *layout; struct clk *bamclk; + struct icc_path *mem_path; int irq; /* dma start transaction tasklet */ @@ -1284,9 +1286,18 @@ static int bam_dma_probe(struct platform_device *pdev) return ret; } + /* Ensure that interconnects are initialized */ + bdev->mem_path = of_icc_get(bdev->dev, "memory"); + + if (IS_ERR(bdev->mem_path)) { + ret = PTR_ERR(bdev->mem_path); + dev_err(bdev->dev, "failed to acquire icc path %d\n", ret); + goto err_disable_clk; + } + ret = bam_init(bdev); if (ret) - goto err_disable_clk; + goto err_icc_path_put; tasklet_setup(&bdev->task, dma_tasklet); @@ -1371,6 +1382,8 @@ static int bam_dma_probe(struct platform_device *pdev) tasklet_kill(&bdev->channels[i].vc.task); err_tasklet_kill: tasklet_kill(&bdev->task); +err_icc_path_put: + icc_put(bdev->mem_path); err_disable_clk: clk_disable_unprepare(bdev->bamclk); @@ -1406,6 +1419,7 @@ static int bam_dma_remove(struct platform_device *pdev) tasklet_kill(&bdev->task); + icc_put(bdev->mem_path); clk_disable_unprepare(bdev->bamclk); return 0; From patchwork Wed Oct 13 10:55:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555625 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 391EFC433EF for ; Wed, 13 Oct 2021 10:59:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 227C060ED4 for ; Wed, 13 Oct 2021 10:59:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230054AbhJMLBb (ORCPT ); Wed, 13 Oct 2021 07:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbhJMLBL (ORCPT ); Wed, 13 Oct 2021 07:01:11 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3431C0617AF for ; Wed, 13 Oct 2021 03:57:00 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id t184so1247296pfd.0 for ; Wed, 13 Oct 2021 03:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ir565eYViyaMF1NhYbNf160wfGMLFG9RXVF0S7mT0r8=; b=EIuYWtDUiCkV6nabp8a3clkBRw/BI5XNCyehvDkZzPIDlRKTJ+6FvRM7Q268Ivhjv3 x6aC9QN2zYKKqBsMYHoZercYfh4C7ms2PZTEjgRSF6B5fvJAEKkjyuo8qssz54pOSDDG sQgv3o+Xu4+0OnVS+IJwtzkPwqaxgc1grU/S00WtkmejNR4CTH04uzFPpwsf6rFyPE0C 9rB06cxOtuNzBOTn7R7Ryd3HADWkujucMxjkdx6gSyEU9DSxX4JtSax63r6vbCzItTZ2 r7Rpy2k+wA1uy+jw9BZ+s56NdVQGwye456TKIjqmk5I0Jz/0m0hVm3+u53ZyJHHXPcDj x5eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ir565eYViyaMF1NhYbNf160wfGMLFG9RXVF0S7mT0r8=; b=BzUzQD0af6a9sO1lVt79EnXJ1u1w/1KGxUp1GEazueRuIW91rigXLZLr1zO5CfPm01 um+e17DOFsyeN5FUpxV8ZObqtfSQ0TkBh/QmIgeGaM7DHH4OZ5LBQND6dOLkSKfaLl2V TPkmFIn/1Z6gIYOJTc/JxdfUYY3jOXbg/4SAlgxKxzhSSXoEplgfFX6hUKsiN25QDqJ4 VtxXfsJSwWcO/ivUMshx9nyrMMPC3TZ2HPHeCAuBSJ6Mxyhpyo1KJlL9q1U4wOCYKk6k 8ZZ01Wnd/rnmW7coWXeWQrXdXypgiDCjHQvw2mSiyHAiYnjzrEVM94vpuNAF17mqOcu6 dNhA== X-Gm-Message-State: AOAM530Gw+C0yW5zrWav7UOZW+Cqd0m/SM4JJKoEu66DgF35EHjCSIY2 wINhdDd4n43LnoA4le1CRpuVW5SWunAfew== X-Google-Smtp-Source: ABdhPJwnglZWYenJRS4WgqciFpCWUiwMSDNY72SLKhg2wBe9u8XThIhQKVtgovadRj74nzGMRAVp8Q== X-Received: by 2002:a63:40c:: with SMTP id 12mr27354845pge.406.1634122620025; Wed, 13 Oct 2021 03:57:00 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:56:59 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 14/20] crypto: qce: core: Add support to initialize interconnect path Date: Wed, 13 Oct 2021 16:25:35 +0530 Message-Id: <20211013105541.68045-15-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Thara Gopinath Crypto engine on certain Snapdragon processors like sm8150, sm8250, sm8350 etc. requires interconnect path between the engine and memory to be explicitly enabled and bandwidth set prior to any operations. Add support in the qce core to enable the interconnect path appropriately. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma [Make header file inclusion alphabetical] Signed-off-by: Thara Gopinath --- drivers/crypto/qce/core.c | 35 ++++++++++++++++++++++++++++------- drivers/crypto/qce/core.h | 1 + 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index d3780be44a76..033c7278aa5d 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -22,6 +23,8 @@ #define QCE_MAJOR_VERSION5 0x05 #define QCE_QUEUE_LENGTH 1 +#define QCE_DEFAULT_MEM_BANDWIDTH 393600 + static const struct qce_algo_ops *qce_ops[] = { #ifdef CONFIG_CRYPTO_DEV_QCE_SKCIPHER &skcipher_ops, @@ -206,21 +209,35 @@ static int qce_crypto_probe(struct platform_device *pdev) if (ret < 0) return ret; + qce->mem_path = of_icc_get(qce->dev, "memory"); + if (IS_ERR(qce->mem_path)) + return PTR_ERR(qce->mem_path); + qce->core = devm_clk_get(qce->dev, "core"); - if (IS_ERR(qce->core)) - return PTR_ERR(qce->core); + if (IS_ERR(qce->core)) { + ret = PTR_ERR(qce->core); + goto err_mem_path_put; + } qce->iface = devm_clk_get(qce->dev, "iface"); - if (IS_ERR(qce->iface)) - return PTR_ERR(qce->iface); + if (IS_ERR(qce->iface)) { + ret = PTR_ERR(qce->iface); + goto err_mem_path_put; + } qce->bus = devm_clk_get(qce->dev, "bus"); - if (IS_ERR(qce->bus)) - return PTR_ERR(qce->bus); + if (IS_ERR(qce->bus)) { + ret = PTR_ERR(qce->bus); + goto err_mem_path_put; + } + + ret = icc_set_bw(qce->mem_path, QCE_DEFAULT_MEM_BANDWIDTH, QCE_DEFAULT_MEM_BANDWIDTH); + if (ret) + goto err_mem_path_put; ret = clk_prepare_enable(qce->core); if (ret) - return ret; + goto err_mem_path_disable; ret = clk_prepare_enable(qce->iface); if (ret) @@ -260,6 +277,10 @@ static int qce_crypto_probe(struct platform_device *pdev) clk_disable_unprepare(qce->iface); err_clks_core: clk_disable_unprepare(qce->core); +err_mem_path_disable: + icc_set_bw(qce->mem_path, 0, 0); +err_mem_path_put: + icc_put(qce->mem_path); return ret; } diff --git a/drivers/crypto/qce/core.h b/drivers/crypto/qce/core.h index 085774cdf641..228fcd69ec51 100644 --- a/drivers/crypto/qce/core.h +++ b/drivers/crypto/qce/core.h @@ -35,6 +35,7 @@ struct qce_device { void __iomem *base; struct device *dev; struct clk *core, *iface, *bus; + struct icc_path *mem_path; struct qce_dma_data dma; int burst_size; unsigned int pipe_pair_id; From patchwork Wed Oct 13 10:55:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555627 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D6CDC433EF for ; Wed, 13 Oct 2021 10:59:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 196AB610D0 for ; Wed, 13 Oct 2021 10:59:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233859AbhJMLBg (ORCPT ); Wed, 13 Oct 2021 07:01:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232784AbhJMLBN (ORCPT ); Wed, 13 Oct 2021 07:01:13 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AA4CC061778 for ; Wed, 13 Oct 2021 03:57:05 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id f5so1919310pgc.12 for ; Wed, 13 Oct 2021 03:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NqGUwXsYMELmrAtaUueoKDZTvSzuO0sYrAVvVt3/FFs=; b=OUev4I/UWIe6xc1YRHFcpA8o0qW2I327gqPM6GaTj5zmGAL5HPwfT7tNFVnmHP/W5x FoZumFY6MdoWMs9VsHrUNMqQNgkIIf1G/C1aOABsDSNnZqR9wLuNSDhXmwN8HFSGDy37 mcYxM0UmuST0WmKRfnpHOijGnykinnrlBvNDpcn56XNL9Mgho0TPHO1hAms94jRwu/rK kPX43AmO8jbqGXBfVnWtWwi4BBqROsN/EWVx6fguJND9IMjupUHbOoKHhStpfJcYqGqN xIUvlZ+W0ABMehGCu4/CGRwaTHQwSIUH6LC0EkMgqhwfBUgA0VC65m+XBLziNtLzt3Wd VLnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NqGUwXsYMELmrAtaUueoKDZTvSzuO0sYrAVvVt3/FFs=; b=S4rgzvCyGTcHV4yh94pEF5QtYpiQ1d5XLsRkcFemrixS93Eog71yEuYmYwWSNwGzR9 l71vCWMvEFHlkN6XJDDxCx1zkW+hjYJWmj3ZXq1/1Grb0HcvLFbGUORQ83/d8+42zQwq 7gRAo21UfkYsAhnEGY/rcyyEkf8tHYXE24mI76lLM8lnjhcoj2wce+M9opSyNflv0+sj oUPCS71yeUrC4LRC56XQ1Jl0hHFRXCVTDFbRqAYtL0Dcv6c2SKOPt17Wi/M+5hZgpmiY rJ2sB98wfYmqk6z08L8/ImYT+qAAT7mOmGtNVBzqsdBDGVu9/hnLv08ZC2Ghv4r4mtkV lCkg== X-Gm-Message-State: AOAM530d0mBsGyrwUv9q4dkHmWa0ofANmBY7VFPHPQZVoXfen6vP2e9n YQk+GBjjwvvJgxtCRqFh/eZxY1CXUui/rQ== X-Google-Smtp-Source: ABdhPJz6H8h2HFXjZ+w1IYSTUDNnuHwhEEL7s/kpupJbUkWgc19FC6+cv0YmPpu1plBwErcL8FCnmQ== X-Received: by 2002:a63:ed03:: with SMTP id d3mr27452891pgi.24.1634122624619; Wed, 13 Oct 2021 03:57:04 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.57.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:57:04 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 15/20] crypto: qce: Add new compatibles for qce crypto driver Date: Wed, 13 Oct 2021 16:25:36 +0530 Message-Id: <20211013105541.68045-16-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since we decided to use soc specific compatibles for describing the qce crypto IP nodes in the device-trees, adapt the driver now to handle the same. Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma --- drivers/crypto/qce/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 033c7278aa5d..2ab0b97d718c 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -298,8 +298,8 @@ static int qce_crypto_remove(struct platform_device *pdev) } static const struct of_device_id qce_crypto_of_match[] = { - { .compatible = "qcom,crypto-v5.1", }, - { .compatible = "qcom,crypto-v5.4", }, + { .compatible = "qcom,ipq6018-qce", }, + { .compatible = "qcom,sdm845-qce", }, {} }; MODULE_DEVICE_TABLE(of, qce_crypto_of_match); From patchwork Wed Oct 13 10:55:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555629 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DBD9C433EF for ; Wed, 13 Oct 2021 10:59:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2118A60ED4 for ; Wed, 13 Oct 2021 10:59:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230150AbhJMLBw (ORCPT ); Wed, 13 Oct 2021 07:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230359AbhJMLBa (ORCPT ); Wed, 13 Oct 2021 07:01:30 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66048C0613A3 for ; Wed, 13 Oct 2021 03:57:09 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 75so1962126pga.3 for ; Wed, 13 Oct 2021 03:57:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MT9l55bItKwW4zbHDysvvnWQI2UpXg0GRXR7AA0D6+o=; b=Hy2WLbWTgOpyChziGWJlhfOCbotX2DDfa5kzMQ5n6qYKet4py0CRZu1NhbxYnM7EkY 0b6Hk7h0+GL9McCDXiPm82b6yveXBn+uE1fUPYfb91MlcEKoNuj2XG+0Yfk5gQS1xcH7 NlANVKMJF7eHtBfZaLGwER+EPMvZmFInxy10FQElVZ/DT1UEAv4vnQS/kr3tU67QVj7+ eCYsAXk7YNwIkgIqcSoc2+J4Yxo2lrfmIkyWSTzr7dHqp/a/+MH/Q/bGaJ5ZXnPDbO2k ggcP+iyXvwav4A1eMPl+hikrhhf9vFts7RIJ8uuS1ivYHWrOk4ZRvlU22SOw8xHi4Iev jnMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MT9l55bItKwW4zbHDysvvnWQI2UpXg0GRXR7AA0D6+o=; b=v3jffUu6Pae0+pLQx7hopoBe6ouC6DcF9jNvuCUuBXXezq3RTSCcCRjlhIpJC3IC9Z G1ZyFbO/ncS9w1uJMnFdkeDaRcA12e8WCOVNczPQKHAI05Fse+eMkG3+RL405ZAVshHW hIdLENQHmAv4Yt/c7HKOwiFH3OagasYM3Vrz/khXhlM5s5udfBf86ynDjonpc0616519 oQfmT2QxdyEHQO+yqqzOoc9N6Bi1XbYGHdSKBlRgZJTgqI58JwHO9GqHHSMIH48yNVr8 Ab6ZtoKYH6QlhtqfHghGyKS71ELxI3OY8jywHkd3pZYVvajWsco8sE3q4+4zBtMO7gJa vYNw== X-Gm-Message-State: AOAM532kyplzN9CbHMZnvqnq+1AlHEajITAqkG7DaE5/aAU+W/fiv/S+ bCrJBFhhqd7zQwWxJhHMvmdSbZzMLs0= X-Google-Smtp-Source: ABdhPJxGPNE1Rn2FeiHga0quikOJnmZU+UBnn7ejHiZqtRROQ/ynCxTBRbppnJCacUDIkwaXGM+cFg== X-Received: by 2002:a63:5453:: with SMTP id e19mr27288018pgm.178.1634122628771; Wed, 13 Oct 2021 03:57:08 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.57.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:57:08 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath Subject: [PATCH v4 16/20] crypto: qce: core: Make clocks optional Date: Wed, 13 Oct 2021 16:25:37 +0530 Message-Id: <20211013105541.68045-17-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Thara Gopinath On certain Snapdragon processors, the crypto engine clocks are enabled by default by security firmware and the driver need not/ should not handle the clocks. Make acquiring of all the clocks optional in crypto enginer driver so that the driver intializes properly even if no clocks are specified in the dt. Signed-off-by: Thara Gopinath --- drivers/crypto/qce/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 2ab0b97d718c..576c416461f9 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -213,19 +213,19 @@ static int qce_crypto_probe(struct platform_device *pdev) if (IS_ERR(qce->mem_path)) return PTR_ERR(qce->mem_path); - qce->core = devm_clk_get(qce->dev, "core"); + qce->core = devm_clk_get_optional(qce->dev, "core"); if (IS_ERR(qce->core)) { ret = PTR_ERR(qce->core); goto err_mem_path_put; } - qce->iface = devm_clk_get(qce->dev, "iface"); + qce->iface = devm_clk_get_optional(qce->dev, "iface"); if (IS_ERR(qce->iface)) { ret = PTR_ERR(qce->iface); goto err_mem_path_put; } - qce->bus = devm_clk_get(qce->dev, "bus"); + qce->bus = devm_clk_get_optional(qce->dev, "bus"); if (IS_ERR(qce->bus)) { ret = PTR_ERR(qce->bus); goto err_mem_path_put; From patchwork Wed Oct 13 10:55:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FD63C433F5 for ; Wed, 13 Oct 2021 11:00:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E812560ED4 for ; Wed, 13 Oct 2021 11:00:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232357AbhJMLCI (ORCPT ); Wed, 13 Oct 2021 07:02:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234056AbhJMLBh (ORCPT ); Wed, 13 Oct 2021 07:01:37 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9156C0613AA for ; Wed, 13 Oct 2021 03:57:13 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id k23so1949216pji.0 for ; Wed, 13 Oct 2021 03:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QbohWyUs/XEVgJ1sMzx5GgNA+CoHQz7FKaMhz+WvP7Q=; b=aWBDPo+XkPYlTM+uRegDzpoN/h679h+9ZFX3Yb9ikiuC3BwoIicwyXzxblfl25u0t3 i5hZ37SfyfUxoCbkac0k50s5cSs+jzDSeCG1Bwom8E1qXnf7oRa/WW4UXuQJKHy9zOy5 5vZ+mQlfFWydlI+nust7zAkVmD06HPzMi3IKNbqqaqjqwpRkSX6hnIuyx93XDMABUq9t NLcA5PhZSyybf5HxtP0nkCgOemXMKS/zVuXkIJWwjtgsj/EGXw/qfjU6ztOIFUxMU3WM q4DQ5WcKsw8MsEXV8uFB8pkhHcMU2nMiMrv8xOxmku5gk0KIWuF73+3c4DueG3kbPVnE G9XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QbohWyUs/XEVgJ1sMzx5GgNA+CoHQz7FKaMhz+WvP7Q=; b=O/L1kWl2zPfATMThS0o2vj1tK4DYm7HpsPRjtXN4SVqVfQgz2REA7NzPMknjxRKex+ 2sZuvomaIxeSv2J23dTRKgNnaIYanW73a5RgyF+HW5ptOhBfSUjLih9D9huSt5GcY4kD IVNz3ufPBwGkelkl4fSGoPC5DMhfmlEv8Up6qT6j1B8lwY3vUUipXXwznxqTeXiuHvlO KgQVv7ZXlgloA7Ki4P7fMnLVGpSqgbexaDTcuJH47G0aAW0R36cXIa6RhbqFK4UF7krI nG7RWfYL4EzlEsBQ6+1eocErJR9d0W4aRHuV5BLN+/miTIdywGd98KUtbHFCLH5oTBwi 8Udg== X-Gm-Message-State: AOAM533FIeZS9gAAz+bKszoNMaybXkzGsUiOWie0pfeOMl/7Xdubj+6H 7bTf5P/WtEnnaaAPiGQiTkppzdCh+lwdPw== X-Google-Smtp-Source: ABdhPJwywYk4PJNAhFCjlu9JSdHG6UaMaytxyWqC5ooJQNf7ZtdtOTA3vvINGm9UW5P007G9L1NphA== X-Received: by 2002:a17:902:6947:b0:13e:8e8d:cc34 with SMTP id k7-20020a170902694700b0013e8e8dcc34mr35131854plt.88.1634122633168; Wed, 13 Oct 2021 03:57:13 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:57:12 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Bjorn Andersson , Thara Gopinath Subject: [PATCH v4 17/20] crypto: qce: Print a failure msg in case probe() fails Date: Wed, 13 Oct 2021 16:25:38 +0530 Message-Id: <20211013105541.68045-18-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Print a failure message (dev_err) in case the qcom qce crypto driver probe() fails. Cc: Bjorn Andersson Cc: Rob Herring Reviewed-by: Thara Gopinath Signed-off-by: Bhupesh Sharma --- drivers/crypto/qce/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 576c416461f9..cb8c77709e1e 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -281,6 +281,8 @@ static int qce_crypto_probe(struct platform_device *pdev) icc_set_bw(qce->mem_path, 0, 0); err_mem_path_put: icc_put(qce->mem_path); + + dev_err(dev, "%s failed : %d\n", __func__, ret); return ret; } From patchwork Wed Oct 13 10:55:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A1D4C433EF for ; Wed, 13 Oct 2021 11:00:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F36460ED4 for ; Wed, 13 Oct 2021 11:00:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233175AbhJMLCT (ORCPT ); Wed, 13 Oct 2021 07:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233049AbhJMLBt (ORCPT ); Wed, 13 Oct 2021 07:01:49 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A77CC0613B1 for ; Wed, 13 Oct 2021 03:57:18 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id lk8-20020a17090b33c800b001a0a284fcc2so4127593pjb.2 for ; Wed, 13 Oct 2021 03:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GmspT9v4sA/scFmja8QBhp8iujwCZQoVmVVy3lhUAPw=; b=GzaFZFELa5u5ICSJTCgBw25KydWG7aF9ucRHVeV27g18BGy45TJtjNp97c/wq9CJwn 10h4ly/cYuxAUfENyX4RELnfsqzDXLdP33/jBp1GFLNon4519yy5PJqds3ukem36gMEn ZpsSITqxK1kEldtF/zg6UUJqYN2Smsulg/0+Qhka7M0caGo+GdGgKUQlX+ND45l4UsKP ahZz4CAOxNVXdzd/9nQa131A3Ql8jK6fZxQ6fcRMfGJ9cNB+FR8dCxseM5/oVmVbioau PsWNpRoeTgzuMp1W0ojfKaOj5bVSUalEfgx3cA/+ncpVRu6J4fsOWLsoUQQ7ECBM+s1x g1+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GmspT9v4sA/scFmja8QBhp8iujwCZQoVmVVy3lhUAPw=; b=sCKjlVpkdHNARMKFMIL4Kr8o4a7bCmnOP/3wKcnlfRFSY4MtM7lEyjf5yLcCiEiIiQ c+yWzWEfk8eK3fGzacdUe3B48dEmnHyavvry4WggD3WU/N1CRVP5dubMcXu8A4otEf6X 04N4pD1PzAj3G1WTfjUGbJcUEGq3J+zNZRIKBKvCDSuZBseYJtKg01D4aCs9enI5QdxK G0kk2iGTd6g2GFjDFzf9Voij+jLXLj2fweKn816xVWkesfiykM81f5hRNQLzyS5JlfQ3 9HaPYkUoCd7YnD+mk5Vsq2uPWLpzV+jvXJFXR3ps0jq3+9ZWn8tsORtVsaZH+8unTqdK 44iw== X-Gm-Message-State: AOAM530+0NCXe3TJYNZF99O0Le7KodnIqgY9/cUInAN6Q7MV8TNvVi/d o7nHbSmsoDLKqgNT72bP7hAnpOtj9NVNSw== X-Google-Smtp-Source: ABdhPJzmSj2IalSjIh3ROQZUOOW9esrWa3UxvoxBfYyLPiGIK6oNIqQjChFfkhTVnJBpYE7NL6cM5A== X-Received: by 2002:a17:90b:4b89:: with SMTP id lr9mr12677708pjb.11.1634122637643; Wed, 13 Oct 2021 03:57:17 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.57.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:57:17 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 18/20] crypto: qce: Defer probing if BAM dma channel is not yet initialized Date: Wed, 13 Oct 2021 16:25:39 +0530 Message-Id: <20211013105541.68045-19-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since the Qualcomm qce crypto driver needs the BAM dma driver to be setup first (to allow crypto operations), it makes sense to defer the qce crypto driver probing in case the BAM dma driver is not yet probed. Move the code leg requesting dma channels earlier in the probe() flow. This fixes the qce probe failure issues when both qce and BMA dma are compiled as static part of the kernel. Cc: Thara Gopinath Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma --- drivers/crypto/qce/core.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index cb8c77709e1e..c6f686126fc9 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -209,9 +209,19 @@ static int qce_crypto_probe(struct platform_device *pdev) if (ret < 0) return ret; + /* qce driver requires BAM dma driver to be setup first. + * In case the dma channel are not set yet, this check + * helps use to return -EPROBE_DEFER earlier. + */ + ret = qce_dma_request(qce->dev, &qce->dma); + if (ret) + return ret; + qce->mem_path = of_icc_get(qce->dev, "memory"); - if (IS_ERR(qce->mem_path)) + if (IS_ERR(qce->mem_path)) { + qce_dma_release(&qce->dma); return PTR_ERR(qce->mem_path); + } qce->core = devm_clk_get_optional(qce->dev, "core"); if (IS_ERR(qce->core)) { @@ -247,10 +257,6 @@ static int qce_crypto_probe(struct platform_device *pdev) if (ret) goto err_clks_iface; - ret = qce_dma_request(qce->dev, &qce->dma); - if (ret) - goto err_clks; - ret = qce_check_version(qce); if (ret) goto err_clks; @@ -265,12 +271,10 @@ static int qce_crypto_probe(struct platform_device *pdev) ret = qce_register_algs(qce); if (ret) - goto err_dma; + goto err_clks; return 0; -err_dma: - qce_dma_release(&qce->dma); err_clks: clk_disable_unprepare(qce->bus); err_clks_iface: From patchwork Wed Oct 13 10:55:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A044AC433FE for ; Wed, 13 Oct 2021 11:00:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 878D7610D0 for ; Wed, 13 Oct 2021 11:00:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233852AbhJMLCX (ORCPT ); Wed, 13 Oct 2021 07:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232145AbhJMLBv (ORCPT ); Wed, 13 Oct 2021 07:01:51 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F36B4C0613BA for ; Wed, 13 Oct 2021 03:57:22 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id g184so1951242pgc.6 for ; Wed, 13 Oct 2021 03:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KIeSWkawFiY3EKsKgOHORiHIHpztrgHhtcjht+dbDL8=; b=F8EQQVS8lD2AmJe6NmVXJvx1DuV+9AXwJi6WVNUKBOPFyc9z+oQ+SEWtsm7ZAbsZUG Vwhju67oKN6l9EQAAWSlvo+EAWzpahGrZInHXAygLxRvfSlcnlIFpbNXndQzn2F58tre 0Z9V7MJzPNy10twHrMiheNKA7QRd8SbMMYIPKRLbbRvZan/otoGnY7cnMkfnopgWHf7S wwKDQ8Sk32bAYfuT7vF6wOmnRFdVOty610dWcCc4SBGXg3pIw1p0ppJCrLdsHDidOc9c UOYhylRG9EsOEss1bmwScqx13yJRKQueS3OvylNWOfLQpWmTRvsSprH/eQHZM4tCGIFX 7AaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KIeSWkawFiY3EKsKgOHORiHIHpztrgHhtcjht+dbDL8=; b=FjwPwB4twKDX/JMD4NmXaDyOKy9VCFe9Mlvm1xoxGJ33lZ5B41G8dTgdzORCtHq4S5 OYtag9uvOOUIggw6JvdDNg6zaLYyxw7I/LwwNkaKqxf/MP6ypb6sNXRsVhIRZ4YIE3q/ oyosQkoMSi1Ofx4owI/xU2v9JimWMLB1JkQHh2StXpAdAWS+FGmkYcyO1SLQaN9WTzy5 dxGFGSTE4UO5Fdok5JcGi5e/VgLmsgtbGI1VT4rVPOICZTxSG/O2RRjZ93yzZ3+ovrPg cIb518ugN13gNtQKZ30yJ8wqsTJXvrgxyv6IZbX2stBxJhbEFO7qXGsAZsDM+UbSQ6JI d9YA== X-Gm-Message-State: AOAM530W2U6+xkcXGjiuLm0DDv4+qoYSgd298ti1cK26tzaZe5oalE8t io1T46WnXsIpxltD3NJjnun0DXp4NZQyag== X-Google-Smtp-Source: ABdhPJyn/6vHcY71500LqC+ZB4kTKev7QGx8YUDta7MQFz8PtPTUQEw7o/zGmliHgnQWK4XYVdpXQg== X-Received: by 2002:a63:392:: with SMTP id 140mr27804274pgd.189.1634122642326; Wed, 13 Oct 2021 03:57:22 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:57:22 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 19/20] crypto: qce: Add 'sm8250-qce' compatible string check Date: Wed, 13 Oct 2021 16:25:40 +0530 Message-Id: <20211013105541.68045-20-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add 'sm8250-qce' compatible string check in qce crypto driver as we add support for sm8250 crypto device in the device-tree in the subsequent patch. Cc: Thara Gopinath Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma Reviewed-by: Thara Gopinath --- drivers/crypto/qce/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index c6f686126fc9..4c55eceb4e7f 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -306,6 +306,7 @@ static int qce_crypto_remove(struct platform_device *pdev) static const struct of_device_id qce_crypto_of_match[] = { { .compatible = "qcom,ipq6018-qce", }, { .compatible = "qcom,sdm845-qce", }, + { .compatible = "qcom,sm8250-qce", }, {} }; MODULE_DEVICE_TABLE(of, qce_crypto_of_match); From patchwork Wed Oct 13 10:55:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 12555637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FF91C433EF for ; Wed, 13 Oct 2021 11:00:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1AE0610C9 for ; Wed, 13 Oct 2021 11:00:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234368AbhJMLCb (ORCPT ); Wed, 13 Oct 2021 07:02:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232498AbhJMLCI (ORCPT ); Wed, 13 Oct 2021 07:02:08 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C6B8C061344 for ; Wed, 13 Oct 2021 03:57:27 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id d13-20020a17090ad3cd00b0019e746f7bd4so4153862pjw.0 for ; Wed, 13 Oct 2021 03:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=05vhPGITK/dB937rYm1EGwoqzkoLVWtPqjC/WL9LiZw=; b=S7V88jjVYtO0IXH6GQgzeyn/ZNIBkw/IeGiok2Aqbs8P0GiGGzyt9qvwqzs7QCrBvz Z08fkLYmeALV/+fwJyo+xUqyllDQBJ+YZVTDu23ToaHzaldpRXvhiSP8QRhxyk0Z+noa 0mjgPf8MtRahtooLr2Q4vU1P+VtB8H0XRVA/ig5i9tih2OX2v4haYeu1kTQABafqz7hl n4/qF5qPd7yqlZ8d5rAeKW+OV1qg0MJ7zo/NFgabAf870lbBAI1K0sZY8wuD2aKibKNK Fh8yjgD3mnG99kynyoTG0/9P26LAM2LXd+2drz/Txkr8dv+K3ZNjTF3mZ+xNV93Jgptq e5Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=05vhPGITK/dB937rYm1EGwoqzkoLVWtPqjC/WL9LiZw=; b=pvw203vzcuUKFg7wxuclQ7U+8upT+DGKALjfQDYXWnK7R0o6JBECFZndlnmAkndw0f pbSHv+itzdOXtDaof5SP/riunPSbECGgBVsy6D0lHDbRABtk3S+DTIC60skDmIIWibrz mAzobM+4MO1I5+4fixoE/dYmVadYmB1ZnkKQbBXgGZQWFIVGg7ItFo2ob0Ob4tH0iSRP BLiSMQjWvyrzdrKdd/BhyAFX8vtaMjkbidTzglek41NDa/50hFpskrRYWyTMgCaz/SFh ih7j/aE0Sy4O6WqXjN8ZtssXVmHTXOMCiImcCLKtjbdX/lSsxUm/D56hrVbsq9Yfxa51 mq/Q== X-Gm-Message-State: AOAM533QfxAdRvk2dMyWO4KXop21GUbfAXeUwbmX6QP3UJ3yDrW0mvkM d+Sh5xH78IohB/fPuBLRJuzTMU8Q6LJoIw== X-Google-Smtp-Source: ABdhPJy7X0JUsQ14mPahK8LxYIB78D5vCGE4viyJztdJsBhPviLXJkoAmf3PKl1cq8YfgDAPbAfZ8g== X-Received: by 2002:a17:90a:6a8f:: with SMTP id u15mr12339071pjj.212.1634122646746; Wed, 13 Oct 2021 03:57:26 -0700 (PDT) Received: from localhost.name ([122.161.48.68]) by smtp.gmail.com with ESMTPSA id b13sm6155351pjl.15.2021.10.13.03.57.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:57:26 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, agross@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, Thara Gopinath , Bjorn Andersson Subject: [PATCH v4 20/20] arm64/dts: qcom: sm8250: Add dt entries to support crypto engine. Date: Wed, 13 Oct 2021 16:25:41 +0530 Message-Id: <20211013105541.68045-21-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211013105541.68045-1-bhupesh.sharma@linaro.org> References: <20211013105541.68045-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add crypto engine (CE) and CE BAM related nodes and definitions to "sm8250.dtsi". Cc: Thara Gopinath Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Signed-off-by: Thara Gopinath --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 8c15d9fed08f..66cfd0b9c7e3 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -4103,6 +4103,34 @@ cpufreq_hw: cpufreq@18591000 { #freq-domain-cells = <1>; }; + + cryptobam: dma-controller@1dc4000 { + compatible = "qcom,bam-v1.7.0"; + reg = <0 0x01dc4000 0 0x24000>; + interrupts = ; + #dma-cells = <1>; + qcom,ee = <0>; + qcom,controlled-remotely; + iommus = <&apps_smmu 0x584 0x0011>, + <&apps_smmu 0x586 0x0011>, + <&apps_smmu 0x594 0x0011>, + <&apps_smmu 0x596 0x0011>; + interconnects = <&aggre2_noc MASTER_CRYPTO_CORE_0 &mc_virt SLAVE_EBI_CH0>; + interconnect-names = "memory"; + }; + + crypto: crypto@1dfa000 { + compatible = "qcom,sm8250-qce"; + reg = <0 0x01dfa000 0 0x6000>; + dmas = <&cryptobam 4>, <&cryptobam 5>; + dma-names = "rx", "tx"; + iommus = <&apps_smmu 0x584 0x0011>, + <&apps_smmu 0x586 0x0011>, + <&apps_smmu 0x594 0x0011>, + <&apps_smmu 0x596 0x0011>; + interconnects = <&aggre2_noc MASTER_CRYPTO_CORE_0 &mc_virt SLAVE_EBI_CH0>; + interconnect-names = "memory"; + }; }; timer {