All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: neil.armstrong@linaro.org,
	Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	Bhupesh Sharma <bhupesh.sharma@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Andy Gross <agross@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-crypto@vger.kernel.org, Rob Herring <robh@kernel.org>,
	Jordan Crouse <jorcrous@amazon.com>
Subject: Re: [PATCH v8 9/9] crypto: qce: core: Add new compatibles for qce crypto driver
Date: Fri, 3 Feb 2023 10:20:51 +0100	[thread overview]
Message-ID: <53af5fdd-149b-272e-902a-6961975f1071@linaro.org> (raw)
In-Reply-To: <261fb8cd-5043-3b2d-2c9a-2e602678517c@linaro.org>

On 03/02/2023 10:19, Neil Armstrong wrote:
> On 02/02/2023 15:20, Krzysztof Kozlowski wrote:
>> On 02/02/2023 15:15, Vladimir Zapolskiy wrote:
>>> Hi Krzysztof,
>>>
>>> On 2/2/23 16:01, Krzysztof Kozlowski wrote:
>>>> On 02/02/2023 14:50, Vladimir Zapolskiy wrote:
>>>>> From: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>>>>>
>>>>> Since we decided to use soc specific compatibles for describing
>>>>> the qce crypto IP nodes in the device-trees, adapt the driver
>>>>> now to handle the same.
>>>>>
>>>>> Keep the old deprecated compatible strings still in the driver,
>>>>> to ensure backward compatibility.
>>>>>
>>>>> Cc: Bjorn Andersson <andersson@kernel.org>
>>>>> Cc: Rob Herring <robh@kernel.org>
>>>>> Cc: herbert@gondor.apana.org.au
>>>>> Tested-by: Jordan Crouse <jorcrous@amazon.com>
>>>>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>>>>> [vladimir: added more SoC specfic compatibles]
>>>>> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
>>>>> ---
>>>>>    drivers/crypto/qce/core.c | 12 ++++++++++++
>>>>>    1 file changed, 12 insertions(+)
>>>>>
>>>>> diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c
>>>>> index 8e496fb2d5e2..2420a5ff44d1 100644
>>>>> --- a/drivers/crypto/qce/core.c
>>>>> +++ b/drivers/crypto/qce/core.c
>>>>> @@ -291,8 +291,20 @@ static int qce_crypto_remove(struct platform_device *pdev)
>>>>>    }
>>>>>    
>>>>>    static const struct of_device_id qce_crypto_of_match[] = {
>>>>> +	/* Following two entries are deprecated (kept only for backward compatibility) */
>>>>>    	{ .compatible = "qcom,crypto-v5.1", },
>>>>>    	{ .compatible = "qcom,crypto-v5.4", },
>>>>> +	/* Add compatible strings as per updated dt-bindings, here: */
>>>>> +	{ .compatible = "qcom,ipq4019-qce", },
>>>>> +	{ .compatible = "qcom,ipq6018-qce", },
>>>>> +	{ .compatible = "qcom,ipq8074-qce", },
>>>>> +	{ .compatible = "qcom,msm8996-qce", },
>>>>> +	{ .compatible = "qcom,sdm845-qce", },
>>>>> +	{ .compatible = "qcom,sm8150-qce", },
>>>>> +	{ .compatible = "qcom,sm8250-qce", },
>>>>> +	{ .compatible = "qcom,sm8350-qce", },
>>>>> +	{ .compatible = "qcom,sm8450-qce", },
>>>>> +	{ .compatible = "qcom,sm8550-qce", },
>>>> I did not agree with this at v7 and I still do not agree. We already did
>>>> some effort to clean this pattern in other drivers, so to make it clear
>>>> - driver does not need 10 compatibles because they are the same.
>>>
>>> Here is a misunderstanding, the compatibles are not the same and it shall
>>> not be assumed this way, only the current support of the IP on different SoCs
>>> in the driver is the same.
> 
> It seems the IP version is discoverable, in this case it's perfectly valid
> to have a generic compatible along a soc specific compatible.
> 
> It has been done and validated multiple times, like for the ARM Mali Bifrost [1]
> 
> I'll propose then to add a generic "qcom,crypto" as fallback to
> all of those new compatibles and clearly document that this is only
> for crypto IP cores versions that have the runtime version discoverable.

Yes, this is good idea.

> 
> We could even add a major version generic fallback compatible like "qcom,crypto-v5" or "qcom,crypto-v5.x"
> to differentiate from older crypto devices.

Since we have mapping of versions to SoC, it's also fine.


Best regards,
Krzysztof


      reply	other threads:[~2023-02-03  9:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 13:50 [PATCH v8 0/9] crypto: qcom-qce: Add YAML bindings & support for newer SoCs Vladimir Zapolskiy
2023-02-02 13:50 ` [PATCH v8 1/9] dt-bindings: qcom-qce: Convert bindings to yaml Vladimir Zapolskiy
2023-02-02 13:50 ` [PATCH v8 2/9] MAINTAINERS: Add qcom-qce dt-binding file to QUALCOMM CRYPTO DRIVERS section Vladimir Zapolskiy
2023-02-06 21:07   ` Bjorn Andersson
2023-02-02 13:50 ` [PATCH v8 3/9] dt-bindings: qcom-qce: Add 'interconnects' and 'interconnect-names' Vladimir Zapolskiy
2023-02-02 13:50 ` [PATCH v8 4/9] dt-bindings: qcom-qce: Add 'iommus' to optional properties Vladimir Zapolskiy
2023-02-02 13:50 ` [PATCH v8 5/9] dt-bindings: qcom-qce: document clocks and clock-names as optional Vladimir Zapolskiy
2023-02-02 13:53   ` Krzysztof Kozlowski
2023-02-02 14:04     ` Vladimir Zapolskiy
2023-02-02 14:21       ` Neil Armstrong
2023-02-02 14:23         ` Krzysztof Kozlowski
2023-02-02 16:16         ` Vladimir Zapolskiy
2023-02-02 16:32           ` Neil Armstrong
2023-02-06 23:45           ` Dmitry Baryshkov
2023-02-10 11:12             ` Vladimir Zapolskiy
2023-02-10 12:03               ` Krzysztof Kozlowski
2023-02-02 22:27     ` Vladimir Zapolskiy
2023-02-03  8:17       ` Krzysztof Kozlowski
2023-02-03  8:26         ` Vladimir Zapolskiy
2023-02-02 13:50 ` [PATCH v8 6/9] dt-bindings: qcom-qce: Add new SoC compatible strings for qcom-qce Vladimir Zapolskiy
2023-02-02 13:57   ` Krzysztof Kozlowski
2023-02-02 14:09     ` Vladimir Zapolskiy
2023-02-02 14:18       ` Krzysztof Kozlowski
2023-02-02 13:50 ` [PATCH v8 7/9] crypto: qce: core: Add support to initialize interconnect path Vladimir Zapolskiy
2023-02-02 13:50 ` [PATCH v8 8/9] crypto: qce: core: Make clocks optional Vladimir Zapolskiy
2023-02-02 13:50 ` [PATCH v8 9/9] crypto: qce: core: Add new compatibles for qce crypto driver Vladimir Zapolskiy
2023-02-02 14:01   ` Krzysztof Kozlowski
2023-02-02 14:15     ` Vladimir Zapolskiy
2023-02-02 14:20       ` Krzysztof Kozlowski
2023-02-03  9:19         ` Neil Armstrong
2023-02-03  9:20           ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53af5fdd-149b-272e-902a-6961975f1071@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bhupesh.sharma@linaro.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jorcrous@amazon.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=thara.gopinath@gmail.com \
    --cc=vladimir.zapolskiy@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.