From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43146C636D6 for ; Fri, 3 Feb 2023 09:21:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232653AbjBCJVP (ORCPT ); Fri, 3 Feb 2023 04:21:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232613AbjBCJUf (ORCPT ); Fri, 3 Feb 2023 04:20:35 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FC6F9A83D for ; Fri, 3 Feb 2023 01:19:11 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id u10so300393wmj.3 for ; Fri, 03 Feb 2023 01:19:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:reply-to:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=k37em+iSA4pp8shcy4mhDg2LmO0zZyrhvJ8r9gNWLJ0=; b=hW8YY1DMLlxd9jNvgjF+foIj96CLaP2x6fGEN3RnsYoKyYKBlhoDG+DL3eFeCgMJ+G hTaESuTAECCmfVVmS1lN9FtWFm4hVY/im6yf/WTfqBwFNoZLq+aNv1MDOPVkHRQ0JFIa UrdAYTMdEqZk2cFbiif32JoTZU+uc8cF4B2q8TcMsmY5fllCeIlrPaJUcIxTf9j/y+v8 rV9Hm7hMffgjydBAhYbpVjTtbrHLykfzyc9+/fwG/eSt2NDB93/AgPCQztfNsVuTkeJ9 9GlnAdXKsAg5wa5XWMN+XNpoXpz/c4oukZh+KgF0KBzHseDzFaaV53Go8l738VYj6kgg NClw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:reply-to:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=k37em+iSA4pp8shcy4mhDg2LmO0zZyrhvJ8r9gNWLJ0=; b=lBnlciG1vyHCfqx1HXOG02Uf5/6w2obSS/avHgmKSrW21I9fsIFukt1r1Wdqedid1k MTJI2wK9/1tOIXqBTl/EEUcidEDtDI8T5c0BGvjlRcL4SVgpCIHGr0FJfkQx+b7WQAWE DJMssH17pz2c0oVSUCb8W1TMezAbQCEU1GNXsduh0qv0HVHXmaeEXCQPNqj9H6zvgR+w Nsu8e2Tce+Ac8JBB3IbEC+xtgmkZOovedZbUQ6TqBZDWwKXDCJ75zLP3EjPa6lTKUaG/ tkqYCCGIsFzph4/VQWNjukimVDM0TA8GUGgruWth2FjbHsTEttOFh0MHaXN0v+6HIOcD lcRg== X-Gm-Message-State: AO0yUKV+u6Tp7E4lhvC0w2TC7y7tXFlV1vdiN0MwGp2e0E3Jm7mWtmFf ECmttcr3ryG6WINeNPPflX4XawHZhfo8zs5sjvE= X-Google-Smtp-Source: AK7set/GYFh4y3+97uGQ1U+qyS7rnb64ienSjSRieFpcYKYgKW8VBKY4nXFj4D2ARmH2eRfTsz3GLw== X-Received: by 2002:a7b:cb85:0:b0:3da:1357:4ca2 with SMTP id m5-20020a7bcb85000000b003da13574ca2mr9816355wmi.11.1675415949575; Fri, 03 Feb 2023 01:19:09 -0800 (PST) Received: from ?IPV6:2a01:e0a:982:cbb0:7407:d8b9:ec7a:537? ([2a01:e0a:982:cbb0:7407:d8b9:ec7a:537]) by smtp.gmail.com with ESMTPSA id m13-20020a05600c3b0d00b003dc51c48f0bsm7999595wms.19.2023.02.03.01.19.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Feb 2023 01:19:09 -0800 (PST) Message-ID: <261fb8cd-5043-3b2d-2c9a-2e602678517c@linaro.org> Date: Fri, 3 Feb 2023 10:19:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH v8 9/9] crypto: qce: core: Add new compatibles for qce crypto driver Content-Language: en-US To: Krzysztof Kozlowski , Vladimir Zapolskiy , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Rob Herring , Jordan Crouse References: <20230202135036.2635376-1-vladimir.zapolskiy@linaro.org> <20230202135036.2635376-10-vladimir.zapolskiy@linaro.org> <6577abf2-7717-b952-13d7-9143200f24fc@linaro.org> <397bcc25-dd5e-808f-a38b-15e6c18db669@linaro.org> <8cf36a4b-2070-2e79-c06d-b0ec06d8b9f7@linaro.org> From: Neil Armstrong Organization: Linaro Developer Services In-Reply-To: <8cf36a4b-2070-2e79-c06d-b0ec06d8b9f7@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 >>>> >>>> Since we decided to use soc specific compatibles for describing >>>> the qce crypto IP nodes in the device-trees, adapt the driver >>>> now to handle the same. >>>> >>>> Keep the old deprecated compatible strings still in the driver, >>>> to ensure backward compatibility. >>>> >>>> Cc: Bjorn Andersson >>>> Cc: Rob Herring >>>> Cc: herbert@gondor.apana.org.au >>>> Tested-by: Jordan Crouse >>>> Signed-off-by: Bhupesh Sharma >>>> [vladimir: added more SoC specfic compatibles] >>>> Signed-off-by: Vladimir Zapolskiy >>>> --- >>>> drivers/crypto/qce/core.c | 12 ++++++++++++ >>>> 1 file changed, 12 insertions(+) >>>> >>>> diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c >>>> index 8e496fb2d5e2..2420a5ff44d1 100644 >>>> --- a/drivers/crypto/qce/core.c >>>> +++ b/drivers/crypto/qce/core.c >>>> @@ -291,8 +291,20 @@ static int qce_crypto_remove(struct platform_device *pdev) >>>> } >>>> >>>> static const struct of_device_id qce_crypto_of_match[] = { >>>> + /* Following two entries are deprecated (kept only for backward compatibility) */ >>>> { .compatible = "qcom,crypto-v5.1", }, >>>> { .compatible = "qcom,crypto-v5.4", }, >>>> + /* Add compatible strings as per updated dt-bindings, here: */ >>>> + { .compatible = "qcom,ipq4019-qce", }, >>>> + { .compatible = "qcom,ipq6018-qce", }, >>>> + { .compatible = "qcom,ipq8074-qce", }, >>>> + { .compatible = "qcom,msm8996-qce", }, >>>> + { .compatible = "qcom,sdm845-qce", }, >>>> + { .compatible = "qcom,sm8150-qce", }, >>>> + { .compatible = "qcom,sm8250-qce", }, >>>> + { .compatible = "qcom,sm8350-qce", }, >>>> + { .compatible = "qcom,sm8450-qce", }, >>>> + { .compatible = "qcom,sm8550-qce", }, >>> 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. 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. Neil > > They are the same for the driver. It's the same what we fixed for SDHCI > and other cases. Why this should be treated differently? > >> >> Later on every minor found difference among IPs will require to break DTB ABI, >> if all of the particular SoC specific comaptibles are not listed. > > No, why? Why SDHCI and hundreds of other devices are not affected and > this one is? > > Best regards, > Krzysztof > [1] https://lore.kernel.org/all/20190401080949.14550-1-narmstrong@baylibre.com/