Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2467718imw; Wed, 6 Jul 2022 06:31:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v+vPRZlz9R0xRJL+cR57GiIVZOVfwxWCmEfbjcEr9vkZMQFUiY2aBkBbu/fOJ8xWWUHJDv X-Received: by 2002:a65:4c0b:0:b0:412:b114:5801 with SMTP id u11-20020a654c0b000000b00412b1145801mr347832pgq.27.1657114260967; Wed, 06 Jul 2022 06:31:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657114260; cv=none; d=google.com; s=arc-20160816; b=zkjvgYKTVFPu3eE4hd1yqrBcXaNHSLLCRrcA9Ms1VRhqd7m5oGGtjoVxvNoFzCCZIl IvlzQ/E/zd3a16I6IoyIIAtaGOfazL2prFnaPaeJEgwT6zssmOBFgg+BYLlZRCpi6J1G IgjNtnhhstWUC210y5MuRK+whfW5nBxx90G1irPRg+XH7YzsTeDs2d4gy7uo/sMZIGY+ vBWspU8/DRIIi4zx+N+g7Y1v3S7P+jlICjl6Zz+1Obzq55sp2xyNHeqkTV6lgPX12ahb UGGLBz30vU1PrbNZrTJf2nYnfnT8azrPLd4X+bdvwRCUb+ZUateZL5TnfQaVaEgUcFFW nxoA== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=3OsBATAtf1YfKRIMWxAt+WpUyedHjaLWTWNTp2XGAxM=; b=vDAy/GX9yBerepjEABFXCRYKFfXTj/my+5pQHlS08XVPntlpxXFqyAwvSl2Z/EL+7j DwAOqkq6i1scDHgiNrIoFwwvUdzOfovXF9JIr3d3jjMaiXhu5wr+VZzczECAayQO5dxP HDrY/K9lvON/jWv+Y6ed2/y8X3j8zjMQQZ0U15EhmxUAcWDinbfWSghxRKVRr0KGdCaA eZJlO8EDUs5lOBWd7zEWo7c5viYMhv1Beb7yOZUl/Av2afnIrQo+I5Ldaq8OeeQSbxEj 6XXTvLKU0tIw8U73uAjPMhXWrWQwhTgdhXuBn4wTMgb8u0GYOecNcIZkXTVewmDih3qt 9Cbw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a1709027c8900b0016a16bd25desi39070196pll.103.2022.07.06.06.30.47; Wed, 06 Jul 2022 06:31:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232716AbiGFMgB (ORCPT + 99 others); Wed, 6 Jul 2022 08:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232256AbiGFMgA (ORCPT ); Wed, 6 Jul 2022 08:36:00 -0400 Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [5.144.164.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C6CF1A81B for ; Wed, 6 Jul 2022 05:35:58 -0700 (PDT) Received: from [192.168.1.101] (abxi46.neoplus.adsl.tpnet.pl [83.9.2.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 584053F669; Wed, 6 Jul 2022 14:35:56 +0200 (CEST) Message-ID: Date: Wed, 6 Jul 2022 14:35:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v3] dt-bindings: qcom: document preferred compatible naming Content-Language: en-US To: Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Srinivas Kandagatla , Dmitry Baryshkov , Vinod Koul , Alex Elder , Robert Foss , Bhupesh Sharma References: <20220705092846.66731-1-krzysztof.kozlowski@linaro.org> From: Konrad Dybcio In-Reply-To: <20220705092846.66731-1-krzysztof.kozlowski@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 5.07.2022 11:28, Krzysztof Kozlowski wrote: > Compatibles can come in two formats. Either "vendor,ip-soc" or > "vendor,soc-ip". Qualcomm bindings were mixing both of usages, so add a > DT schema file documenting preferred policy and enforcing it for all new > compatibles, except few existing patterns. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Changes since v2: > 1. Narrow the expected pattern to be followed by dash '-' after model > number (msm8996-) or by two letters and a dash (sc8280xp-). > 2. Add qcom,apss-wdt-xxx to list of exceptions. > 3. Use comment instead of description in the oneOf list. > > Changes since v1: > 1. Add schema instead of readme (Rob). > > Cc: Srinivas Kandagatla > Cc: Dmitry Baryshkov > Cc: Vinod Koul > Cc: Alex Elder > Cc: Robert Foss > Cc: Bhupesh Sharma > --- > .../devicetree/bindings/arm/qcom-soc.yaml | 57 +++++++++++++++++++ > 1 file changed, 57 insertions(+) > create mode 100644 Documentation/devicetree/bindings/arm/qcom-soc.yaml > > diff --git a/Documentation/devicetree/bindings/arm/qcom-soc.yaml b/Documentation/devicetree/bindings/arm/qcom-soc.yaml > new file mode 100644 > index 000000000000..6307c925335d > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/qcom-soc.yaml > @@ -0,0 +1,57 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/arm/qcom-soc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm SoC compatibles naming convention > + > +maintainers: > + - Bjorn Andersson > + > +description: | > + Guidelines for new compatibles for SoC blocks/components. > + When adding new compatibles in new bindings, use the format:: > + qcom,SoC-IP > + > + For example:: > + qcom,sdm845-llcc-bwmon > + > + When adding new compatibles to existing bindings, use the format in the > + existing binding, even if it contradicts the above. > + > +select: > + properties: > + compatible: > + pattern: "^qcom,.*(apq|ipq|mdm|msm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" > + required: > + - compatible > + > +properties: > + compatible: > + oneOf: > + # Preferred naming style for compatibles of SoC components: > + - pattern: "^qcom,(apq|ipq|mdm|msm|qcs|sa|sc|sdm|sdx|sm)[0-9]+-.*$" > + - pattern: "^qcom,(sa|sc)8[0-9]+[a-z][a-z]?-.*$" > + > + # Legacy namings - variations of existing patterns/compatibles are OK, > + # but do not add completely new entries to these: > + - pattern: "^qcom,apss-wdt-(apq|ipq|mdm|msm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" > + - pattern: "^qcom,gcc-(apq|ipq|mdm|msm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" > + - pattern: "^qcom,mmcc-(apq|ipq|mdm|msm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" > + - pattern: "^qcom,pcie-(apq|ipq|mdm|msm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" > + - pattern: "^qcom,rpm-(apq|ipq|mdm|msm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" > + - pattern: "^qcom,scm-(apq|ipq|mdm|msm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" > + - enum: > + - qcom,gpucc-sdm630 > + - qcom,gpucc-sdm660 > + - qcom,lcc-apq8064 > + - qcom,lcc-ipq8064 > + - qcom,lcc-mdm9615 > + - qcom,lcc-msm8960 > + - qcom,lpass-cpu-apq8016 > + - qcom,usb-ss-ipq4019-phy > + - qcom,usb-hs-ipq4019-phy > + - qcom,vqmmc-ipq4019-regulator Maybe we could add new compatibles for these drivers and replace them in upstream DTs, but keep the old ones in the drivers with a clear indication that they are there only for legacy reasons? In the specific case of gpucc-sdm630/660 I think we could even "break" backwards compatibility, as the only users of that driver (Adreno GPU & its SMMU) depend on an iommu series to function properly, which has been stuck in the freezer.. Konrad > + > +additionalProperties: true