From patchwork Mon Sep 26 12:15:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12988739 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 231F2C32771 for ; Mon, 26 Sep 2022 14:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234186AbiIZODd (ORCPT ); Mon, 26 Sep 2022 10:03:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234920AbiIZODH (ORCPT ); Mon, 26 Sep 2022 10:03:07 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF5816FF8F for ; Mon, 26 Sep 2022 05:15:42 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id c7so7168366ljm.12 for ; Mon, 26 Sep 2022 05:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=IY5WCju6CXSMSpyaBxZnX9goKMuzVUk1634djEYX4Mo=; b=wR7zZHc20zH30JAQxHhs/jAP+ec2By8goTerBpRyfRIvHLAftHntMmUN9BYz+7ais3 wp8qU7nhkP7NraXPF6mB5DlKTUNJnITNdux4fsm0JLN9vsL4h7Ek+P6tZCTGZTNxIwtX Q0lfC6NHyBZ4QzAkkad1XQyohJIkfGm1lBK4S9YP9XTLE0UPXGnce6OxtbMG8SUqiFAm Y1NcFmozwtbcO6N1bJHFS/UaTz0z/pBTlvd4GGTxUIlAxZgIjZsI46GMIVoqQZg4v9yw USlsfx+vXcwnb5rSNmPCTs7zYvPWcAs0XhyQOp8W87skdikhAlcNW/iqh5HyDl6Wh92a V9EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=IY5WCju6CXSMSpyaBxZnX9goKMuzVUk1634djEYX4Mo=; b=B/+QAFf2aDCtAdfvZOJlWbKw+wM1usTXvcxJUSNahhJ1u3IV/6xDrBAFcdUJuNdaB9 K6TpoLLcra6SQZgH1tUS38r4HemzhQPxx/6+PTo7AvROo9PMMCzMZwsqe8rVuA7GVBHH rSDQY9yfDZIOheeat82NZNqMJFxLrnY9GLl7jaB7wfiQi81QstbSlrfW5X3wdBGPw1TU jwTEdWfUZaDDowYvNQJk7gF4+b6wG6TE4GSqqoQ7HsJeHDein4qnIpwQtrNpQdkxcCwb k2FpQvxAvg4CGOV0icsmKoyCXnT52fSaKIBO1QoncosmsBWGEaKSnvbSTSpyNN/SyZW3 mhjQ== X-Gm-Message-State: ACrzQf32HsLSBfN8Jcarl5jy6JhM3iFbZmmnYyqYAXZGaVGDhfn0H9J8 DTK2PgkmA8LCaPCIIzaZNkvp5w== X-Google-Smtp-Source: AMsMyM74YzEMyURaMahwhUvcwk8S5UT5ZaUTOc8Phe7quGfAlMFe86CKHINRb0Frulqwn84EogHUSA== X-Received: by 2002:a05:651c:4cf:b0:26c:6cba:c57a with SMTP id e15-20020a05651c04cf00b0026c6cbac57amr7594584lji.288.1664194538091; Mon, 26 Sep 2022 05:15:38 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id l10-20020a056512110a00b004971a83f839sm2514717lfg.39.2022.09.26.05.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 05:15:36 -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 , Rob Herring , Dmitry Baryshkov , Srinivas Kandagatla , Vinod Koul , Alex Elder , Robert Foss , Bhupesh Sharma Subject: [RESEND PATCH v5] dt-bindings: qcom: document preferred compatible naming Date: Mon, 26 Sep 2022 14:15:31 +0200 Message-Id: <20220926121531.357741-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 Reviewed-by: Rob Herring Reviewed-by: Dmitry Baryshkov --- Resend: 1. Add Dmitry's tag. Changes since v4: 1. Add qcm. 2. Add more qcom,ipq806x exceptions. 3. Add Rob's tag. Changes since v3: 1. Add qcom,kpss-wdt-xxx to pattern for exceptions. 2. Add ipq806x entries to list of exceptions. 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 | 65 +++++++++++++++++++ 1 file changed, 65 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..9918b20e4478 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/qcom-soc.yaml @@ -0,0 +1,65 @@ +# 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|qcm|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|qcm|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,[ak]pss-wdt-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" + - pattern: "^qcom,gcc-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" + - pattern: "^qcom,mmcc-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" + - pattern: "^qcom,pcie-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" + - pattern: "^qcom,rpm-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$" + - pattern: "^qcom,scm-(apq|ipq|mdm|msm|qcm|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 + + # Legacy compatibles with wild-cards - list cannot grow with new bindings: + - enum: + - qcom,ipq806x-gmac + - qcom,ipq806x-nand + - qcom,ipq806x-sata-phy + - qcom,ipq806x-usb-phy-ss + - qcom,ipq806x-usb-phy-hs + +additionalProperties: true