From patchwork Mon Jul 4 10:29:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 587258 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 AF1BDC43334 for ; Mon, 4 Jul 2022 10:29:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234054AbiGDK3x (ORCPT ); Mon, 4 Jul 2022 06:29:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233976AbiGDK3s (ORCPT ); Mon, 4 Jul 2022 06:29:48 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA402AE67 for ; Mon, 4 Jul 2022 03:29:46 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id p14so134651ljc.13 for ; Mon, 04 Jul 2022 03:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZpLOB+GeqZUZaWdoW3n5TUSSrySl3KCsNy7wywNHGKA=; b=b6CpaGtKjjfHIHJCOvE2hZQK80YR/EuQRFB5PMr17yruaa8c7aJzT0RzikFjXQ0tAR 8HQFv8qPgr3zo/KRdpS3ELul484i4ljl9Ae1AYC8MNgqO/2yruNhhTwC7SF2z12jdjT2 j8J1l2hCzr5qcUNzLWpx/W6+TarQXZhO6/WNYH7LOHlp5mEwzUQZXjxAgTsihTdP5ldj s0QMgG2g6UaUHPU7vZ4fH3rwU8X/5ELJ3XsrTFCWhqh6BxFFrTuZLR9XR9wlnis1gJQm wwbGGATK4vvT4G7SrX07ekgy7ERI+NQ+Srm2OSXWwQ5Pbv8IGDgoJa2tBfr4fwykw5zA +WKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZpLOB+GeqZUZaWdoW3n5TUSSrySl3KCsNy7wywNHGKA=; b=lp4fEMJskUqAiW0szKm9ldGVglJZVlp5/efAnfUvequxk4ftRFpypSs3zjq75dWz/J Ahq+jNPJ1eXgNXVVDvKPvXiSgX+s5K3bxdIzqERyQW7tJ4F0k/dKykjcQcY/FozF4IBT 3Gy85Js9SdnFDEtyciZKTlKua31ZykviMXt5fIFWPbJmFzF6p9UyFxSOSDJR31XOOjUT 0IEsJ07gqYh9lcW4wrk4pAEsWOYpP71w5DYs4j16PiojKqDkhhY1Ru082LJ9KCGPIpcF gfEQG2Cpzd6l/9b526DGVt2mTok7n2FLBO70+tT7Ee9a5GV3Bbs1sD13V4JAgw6z8AEh HxRg== X-Gm-Message-State: AJIora/QgsLzsOMdG79Y8NZyqtzg9aU3MFl8zRgPpScOatnMqOmH8/Tv 0IYHPS03X9W7d4uwzyjq79BFhA== X-Google-Smtp-Source: AGRyM1tCDuktvi2GzIE4J+9Ye28RHU50EuxwYQs3Ch8ATjRmMsdXxAWN1iTcqxp4UDuEbfIblpr1/w== X-Received: by 2002:a2e:9105:0:b0:25a:7461:55b2 with SMTP id m5-20020a2e9105000000b0025a746155b2mr16537845ljg.326.1656930585167; Mon, 04 Jul 2022 03:29:45 -0700 (PDT) Received: from krzk-bin.home ([84.20.121.239]) by smtp.gmail.com with ESMTPSA id j24-20020ac253b8000000b004796a17246esm2930279lfh.252.2022.07.04.03.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 03:29:44 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Alim Akhtar , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: samsung: document preferred compatible naming Date: Mon, 4 Jul 2022 12:29:12 +0200 Message-Id: <20220704102912.110881-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Compatibles can come in two formats. Either "vendor,ip-soc" or "vendor,soc-ip". Add a DT schema documenting preferred policy and enforcing it for all new compatibles, except few existing patterns. The schema also disallows wild-cards used in SoC compatibles. Signed-off-by: Krzysztof Kozlowski --- .../bindings/arm/samsung/samsung-soc.yaml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml new file mode 100644 index 000000000000..97ed793cd9c3 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/samsung/samsung-soc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung S3C, S5P and Exynos SoC compatibles naming convention + +maintainers: + - Krzysztof Kozlowski + +description: | + Guidelines for new compatibles for SoC blocks/components. + When adding new compatibles in new bindings, use the format:: + samsung,SoC-IP + + For example:: + samsung,exynos5433-cmu-isp + +select: + properties: + compatible: + pattern: "^samsung,.*(s3c|s5pv|exynos)[0-9a-z]+.*$" + required: + - compatible + +properties: + compatible: + oneOf: + - description: Preferred naming style for compatibles of SoC components + pattern: "^samsung,(s3c|s5pv|exynos|exynosautov)[0-9]+-.*$" + + # Legacy compatibles with wild-cards - list cannot grow: + - enum: + - samsung,exynos4x12-pinctrl + - samsung,exynos4x12-usb2-phy + - samsung,s3c64xx-pinctrl + - samsung,s3c64xx-wakeup-eint + +additionalProperties: true