Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1039045imw; Tue, 5 Jul 2022 02:41:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s7tBASApbQclFkQenkcLys1Xnsj/sDlKJr+1ZexSA5euArY5k6EbQgRcDyZTOt3LJio/52 X-Received: by 2002:a17:90a:a404:b0:1ee:e545:288b with SMTP id y4-20020a17090aa40400b001eee545288bmr39516253pjp.142.1657014076954; Tue, 05 Jul 2022 02:41:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657014076; cv=none; d=google.com; s=arc-20160816; b=wTTPYlK7xWgDehMg7pJ2H/qEaLrHjAZZ55aNqSMKzk/H3xsHgKnhvIP+VV1jkRUXcS SvP/JNXpOII5hyW4iH3+WneVd7vZavVvI9iAsMpfDEZy2RMLYgkHDkdB8ZjTBC/BR8Gc 5bGn7WgViz4Y14RffZE1gX37rx3FegBOxHdl0fyXi8jMUOUy1SZsooujDSNVAjHhAbvM VzFoV+/pY5ctjd135nlErccCBYdnOyEVoeB1kp9d/alSsC3W8v9N9tysVu9FC060UPr1 ywQxzbCyubOZUdWKuKJUXo2XEGPKr0Rq6LaT4Y2kpCBUj87bJiVjSG9LE757kSTXbzX9 DBaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6KsRcwBEuUzrOwyM/pW4cN1uOT0jToSb3abL+hcUjTA=; b=l6F+ZX8lsRJYBnB79wYOVrFgksgeeXWYw/7Ju15qTXC/Std2/IXJRski8mu9Yg5+8S sg44RVg3vrDx1fBId610DJyY19zcl2ejvQr0J/iDuygpF8dEsYqpxLQqhlG2KL8bzabc 9axWvU3PU2kEYeYbfEt8RcPgpd9mYicuvf4Q5uJwv6xouJzvsHfbq6/7m8X+9PdSRbfI pot6dhlnp9YQyGt/UuOdRQ0c+O82dOWuz6/9aJJCCPU4ftz2biXge1IPKZExUBf5jGNG LYfuG8F6azkbDpgorPBLDkshikbBB2yHB4Ro9347UkBWDdIT6N15suG0JfCOoakjY4k7 ACKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L52O7ne+; 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 17-20020aa79251000000b0051bb1890459si16119838pfp.28.2022.07.05.02.41.03; Tue, 05 Jul 2022 02:41:16 -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=L52O7ne+; 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 S229700AbiGEJaA (ORCPT + 99 others); Tue, 5 Jul 2022 05:30:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbiGEJ30 (ORCPT ); Tue, 5 Jul 2022 05:29:26 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CBA912D38 for ; Tue, 5 Jul 2022 02:28:52 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id q8so1321858ljj.10 for ; Tue, 05 Jul 2022 02:28:52 -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:mime-version :content-transfer-encoding; bh=6KsRcwBEuUzrOwyM/pW4cN1uOT0jToSb3abL+hcUjTA=; b=L52O7ne+YsZHSQr4O9CTInvLdgqN2P1KiVwtPWECgESIE3KMCako5cycNBEW5CWuQ2 r8rc5ACELpd4JWR42AWIFqQt9BAjRgXE/DnF8YvRbq2mVFj7/CdYxiCYzXEaUqZXJfRZ 7UXCucsKNNNzXwkgIfQCoAxZiRI7zTxlwBfhJwp3i90i49s0Tt70GuYu4cNt5i9Ljsln Er6qtba/oNMGza0F2vHvrVhTPeUv3Qboc9K1PaCzDQjXG53GHxV9fnB2NdRedqGQgMlP Rr5fielx6JNFVKbZPDzupDmSCfL6KRLbf/1XWFHZ6kBBtgysX1S78vv11dDnih42Hc4x vGRg== 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:mime-version :content-transfer-encoding; bh=6KsRcwBEuUzrOwyM/pW4cN1uOT0jToSb3abL+hcUjTA=; b=y4zw98VXxeTdJu5mqudJt/bKUn8saW6mhUGrhb+P5fR6MDRF2GtqFgrwrq6RKYFVEJ z7KzWuJd2nUe1elR90snm9H9nhp5iTEPnMo6zUSlvbrU1KjbqR1OwoIwo9hP87gIacqN Jzj9KYfFGt1yT11L83pCjvCmC98ElyCeEzFh2tyYallBm4wyO+lS0ZKmml+BBV3O7RSR ktMDz1YhFhRnqpHLVHD7F6fzzhXR1qXwumvZhZBX1dR3X2QmjDs65Y6tBzhQLRnIiKv3 8FkiwhrAL9WtYe2cQaNGLTFssIT6b4+kZj9T9rW9y0QjJN8EDNRanfR6AOdcdNMQZHgV 1O8A== X-Gm-Message-State: AJIora84Uwz2Yuel8GFpXtbgLELOUYpvEv6C/5uOuR6q0bQp+zIZMnFz 4oUxlhXjL4SrwpcFpvpAvqIZmXJBb6C6GA== X-Received: by 2002:a2e:9657:0:b0:25d:30c3:9ba with SMTP id z23-20020a2e9657000000b0025d30c309bamr1687782ljh.350.1657013330096; Tue, 05 Jul 2022 02:28:50 -0700 (PDT) Received: from krzk-bin.home ([84.20.121.239]) by smtp.gmail.com with ESMTPSA id v19-20020ac258f3000000b00483f8c40c14sm154249lfo.243.2022.07.05.02.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 02:28:49 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Srinivas Kandagatla , Dmitry Baryshkov , Vinod Koul , Alex Elder , Robert Foss , Bhupesh Sharma Subject: [PATCH v3] dt-bindings: qcom: document preferred compatible naming Date: Tue, 5 Jul 2022 11:28:46 +0200 Message-Id: <20220705092846.66731-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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 + +additionalProperties: true -- 2.34.1