Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1788917rwi; Thu, 3 Nov 2022 09:05:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5TEuXztOGd4uE7Ca/+WziOEWNG6JRfjLwCS5CdwTs1KYOFsgNg3E6OlXSHPespQKSfkKAR X-Received: by 2002:a05:6402:42d0:b0:457:d16e:283d with SMTP id i16-20020a05640242d000b00457d16e283dmr30593616edc.395.1667491517982; Thu, 03 Nov 2022 09:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667491517; cv=none; d=google.com; s=arc-20160816; b=mM+oxivAXaEIAyAfjEGTUErwaoznoa3ioE0IrIWaUNEuwWDYu38Wb6lW1D2361agRj ns6NhbQXLpsBM4/XzBAbhlqFFjoYFrhmeAsGjrg3s9tMNp396NCJM38cdQTwuvaPiVRa GlaVh9Z03ObfVwTNkOinJYwjmfEg0gHkzGeFA5AcDmshYXaQqQ9QU7KMRsj4HAyCzC3W aMSwchzPLmyQlG+YREtaQgX+fOYriNJOZUaMIigMyn2kn416hEVZBVisd02WWuJ56OBK M5djwHNi2CvGkfEVIR1pyF2QHwMCI3WfxXemlFTxJDnjf2gibO+Ggxgzw/4IQsCEox07 PvjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tEdlO2eJHCWVqpq9ZVmfFrHoK+b5oUGHwUErbKgRbJo=; b=UvZzIP1f2UBrOLPsxBZqoiMdWR766ASj/9rNNEW0whIcCIkImRJEJdJ8IsSMHfmVID lSoMiW6Rd6EyeY/QPqpCO8QRDULgFh4Gk9Cwg/2SLODcxbedK3VasPtK5Gz2130GNwLZ 8XgYpnbJ5A/d7RRv1idhqgATO3fkaC687FUt+Vxoy91R7vEExUva7dmxMRFS0XcCbpPm eWboCIEgVuyQUdEZEVaUWbQjCqR8g5b7E8BqN7BWF8XHMzZwpXMSJhsk28vgYQUOWz33 2PIH79uUaQHiIIE8XNE9xyVkL41xA1m2r7hdXGeb4FIk8ODICuLgpm3k/w/eLJLk2gYp pTFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ehxT8BnU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cq6-20020a056402220600b0045bd677b3d5si1211714edb.342.2022.11.03.09.04.49; Thu, 03 Nov 2022 09:05:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ehxT8BnU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231913AbiKCP40 (ORCPT + 97 others); Thu, 3 Nov 2022 11:56:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbiKCP4Y (ORCPT ); Thu, 3 Nov 2022 11:56:24 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8120213E29 for ; Thu, 3 Nov 2022 08:56:23 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id 8so1420054qka.1 for ; Thu, 03 Nov 2022 08:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tEdlO2eJHCWVqpq9ZVmfFrHoK+b5oUGHwUErbKgRbJo=; b=ehxT8BnUuWvvgFR/WyjOn0EeBKCALG1yZXrAqTz8QVo/bXbWOKQimZ7PSY02mWw3eR 6Gyd99eRGa1Ay7XFHF5zwJ4JKbJtqYcY2es1g8JbRs0H6VceGJqd89HZq8RLTN3a8pRC aZAM2E+sh9MkRwyXCuO1zVngZotQEmRnkr6oZclSbcdxB1lG1+dVicvR0lDkjNrteQ1h ODlv68plAFnp9sDypLOyy3KbFtrCEqIdLS62H2tdQR4rsb4haernYYt11LUnH7vfimht 3dGZJUx0NVimXDkQsJWV5xJR0RXfkaQ0QLf1E9ellUyKCsmJRGrKQWstv7TjA8/OuKBy 58/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tEdlO2eJHCWVqpq9ZVmfFrHoK+b5oUGHwUErbKgRbJo=; b=i1gJrorCAvlecnVuhhcucxnS3QXUlyot/jvd8krurtFiEZusZgoLGu0DjZyCa43iep tDRMu8mhztwt17w6U5aHRLfA5ccYwvB0hM4RII3HGMRZyLFyYiEhbT0ASQewboHv6B6h pI+XAveGMIKjxluhybo0uzjMqcNfCPQmoTbxnYtDRpRX3ty3Lz8oh1To6P+nyWDKO5gb Ite6Ujf0EepJ8inKt9pUuT4oAcp1/9K6Fvhv0fNZ3XBjQrpxRv55Z/UyVeu9KtK0TiGq jbc9gJq6BGfxO2ql3E6mQ2cOo6WpKi4tNcO+6J2si4daHL/ezxbGeNUkFJn5DwFq3b9/ hc9A== X-Gm-Message-State: ACrzQf1hG8qvwD/liMqOGtwu3kJ4gCzAqgg8++CBV7ALCapbxgYT4MWF 0o4xU6ulZIDh22aBpHgpsgMKJGiqtBTTJw== X-Received: by 2002:a37:6588:0:b0:6fa:3046:7f8b with SMTP id z130-20020a376588000000b006fa30467f8bmr15690041qkb.752.1667490982649; Thu, 03 Nov 2022 08:56:22 -0700 (PDT) Received: from ?IPV6:2601:586:5000:570:a35d:9f85:e3f7:d9fb? ([2601:586:5000:570:a35d:9f85:e3f7:d9fb]) by smtp.gmail.com with ESMTPSA id ey21-20020a05622a4c1500b003988b3d5280sm725662qtb.70.2022.11.03.08.56.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 08:56:22 -0700 (PDT) Message-ID: <910c152d-5e1a-4667-2f0a-a1524f51958c@linaro.org> Date: Thu, 3 Nov 2022 11:56:20 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH 05/10] dt-bindings: interconnect: Add sm8350, sc8280xp and generic OSM L3 compatibles To: Bjorn Andersson Cc: Bjorn Andersson , Georgi Djakov , Rob Herring , Sibi Sankar , Konrad Dybcio , Mike Tipton , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221028034155.5580-1-quic_bjorande@quicinc.com> <20221028034155.5580-6-quic_bjorande@quicinc.com> <20221103034410.GB5525@core-thresher1.qualcomm.com> <20221103154653.67mgsey57uvdcvx3@builder.lan> Content-Language: en-US From: Krzysztof Kozlowski In-Reply-To: <20221103154653.67mgsey57uvdcvx3@builder.lan> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/11/2022 11:46, Bjorn Andersson wrote: > On Thu, Nov 03, 2022 at 08:25:17AM -0400, Krzysztof Kozlowski wrote: >> On 02/11/2022 23:44, Bjorn Andersson wrote: >>> On Fri, Oct 28, 2022 at 06:12:29PM -0400, Krzysztof Kozlowski wrote: >>>> On 27/10/2022 23:41, Bjorn Andersson wrote: >>>>> Add EPSS L3 compatibles for sm8350 and sc8280xp, but while at it also >>>>> introduce generic compatible for both qcom,osm-l3 and qcom,epss-l3. >>>>> >>>>> Signed-off-by: Bjorn Andersson >>>>> --- >>>>> .../bindings/interconnect/qcom,osm-l3.yaml | 22 +++++++++++++------ >>>>> 1 file changed, 15 insertions(+), 7 deletions(-) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml b/Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml >>>>> index bf538c0c5a81..ae0995341a78 100644 >>>>> --- a/Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml >>>>> +++ b/Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml >>>>> @@ -16,13 +16,21 @@ description: >>>>> >>>>> properties: >>>>> compatible: >>>>> - enum: >>>>> - - qcom,sc7180-osm-l3 >>>>> - - qcom,sc7280-epss-l3 >>>>> - - qcom,sc8180x-osm-l3 >>>>> - - qcom,sdm845-osm-l3 >>>>> - - qcom,sm8150-osm-l3 >>>>> - - qcom,sm8250-epss-l3 >>>>> + oneOf: >>>>> + items: >>>> >>>> oneOf expects a list, so this should be " - items" >>>> >>> >>> Ahh, thanks. Must have missed running the dt_binding_check on this one. >>> >>>>> + - enum: >>>>> + - qcom,sc7180-osm-l3 >>>>> + - qcom,sc8180x-osm-l3 >>>>> + - qcom,sdm845-osm-l3 >>>>> + - qcom,sm8150-osm-l3 >>>>> + - const: qcom,osm-l3 >>>> >>>> The concept is good, but are you sure all SoCs will be compatible with >>>> generic osm-l3? >>> >>> Per the current implementation yes, worst case if one or more of them isn't the >>> more specific compatible can be used to alter the behavior of that platform. >>> >>>> Why not using dedicated compatible of one soc, e.g. the >>>> oldest here? We already did like that for BWMON, DMA and few others. >>>> >>> >>> Because if we say compatible = "qcom,sc8180x-osm-l3", "qcom,sdm845-osm-l3" and >>> there is a quirk needed for "qcom,sdm845-osm-l3" we're forced to add a "special >>> case" every other *-osm-l3 in the driver. >>> >>> This way we can have a generic implementation for the qcom,osm-l3 and if we >>> realize that we need to quirk something for the oldest platform, we can do so >>> without affecting the others. >> >> True. This also means we do not really know which one is the generic >> implementation :) >> > > There currently is an implementation without platform specific quirks, I > call that the generic implementation and suggest that we refer to that > using "qcom,osm-l3".> > If we instead were to use sdm845 as the generic compatible, and there > turns out to be a need for a quirk for this platform, you: > > 1) no longer have a generic implementation, but 4 platform-specific > implementations It's okay because there is no such thing anymore as "generic implementation". If this happened, your generic compatible is not specific enough. It does not represent any specific hardware. Adding generic compatibles just to make driver binding easier, is a bit in contrast with DT which should focus on hardware description. > > 2) have 3 platforms claiming to be compatible with the quirked (now > specialized) implementation, which they clearly aren't anymore Yes, that's the problem and this is why I mentioned that we do not know the generic implementation. If we knew that sdm845 is the generic, we would not expect specific quirks for it. If you cannot make sdm845 generic because of unknown quirk, then you just do not know which one is generic implementation and that compatible is not specific enough... Or it is specific only to current Linux driver. > Therefor I favor using generic names for generic compatibles. They make driver development easier but they hide the real match between hardware and compatible. Best regards, Krzysztof