From patchwork Tue Mar 14 08:09:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 663778 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 616E9C6FD1C for ; Tue, 14 Mar 2023 08:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229992AbjCNILQ (ORCPT ); Tue, 14 Mar 2023 04:11:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbjCNIKx (ORCPT ); Tue, 14 Mar 2023 04:10:53 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F4FD98873 for ; Tue, 14 Mar 2023 01:09:26 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id j11so58458115edq.4 for ; Tue, 14 Mar 2023 01:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781362; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XiYe59K/JW84fiGlU+Xr8BHz4mzNfyCUd0UP7U7R+9g=; b=Oqor/XJwqHibojde+FBDU2dTKkGRM+AcLI0oYDIN/DgzIWQ5rw1+huz5c373gjSDsO KObw4HLJKYSIEEpyhG4Bf7cHBMpJkAtGAoakGBj/jme3m3j1xjW/5MJlIl5EtjyR+mfz go1pCH9nWTxkvBRy4nI13VqGPdUObPeAo1sL+AEurNH7DntfAGgx9I7G5q2XbKeKtOP0 kZxHjsZcDSPMKGxDXPhVAYQnGtikHJ/XroxP1cHO1su9u57vn+j2M5F8Lvvva5iithZ4 Ur49KgvTMta/KWMODxSyHGHYwUV/+xI5AGa7TaxlCJ4BtJxyRJNS9ny8M4swR8YurlS5 jPgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781362; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XiYe59K/JW84fiGlU+Xr8BHz4mzNfyCUd0UP7U7R+9g=; b=o63b3bKKG2rGZn8p0LFkJ2M/cg1on0BhCgY9hx4zEqG0IuvEDSmtA8QwP+iep37ziZ A/8L3AlC87KKxdHw7A3+FpRM9GEAW6No55tcmPNCywnmu+s6gAmy8qSIXYic8e6cgpsE 1XhyMJjMcANoN2Dk1gbMxYdK1Hu+K5cUGJow/4x329FOmGuPojbqBzjzPE11aGadii9o AmhuXQLKhVqRMk9ikbefZqGyh/KTqHeTDm1qgIz0+BvOVItGSwl3aaBYnaT3FJBTdFQ9 gqqSnImFH6m9qPRxC4hCliHVrx/3z7/tDHGVhO6HpRgzK1VmD/kdmMGioqdWc8iZffly JPSg== X-Gm-Message-State: AO0yUKXqx3YgoXu1f5UAf8L6iutdLvxHflzQZDBzda6yMQz8nBPCTZCx BL35gjeohW/ylNTjyACVD4ImfcYRjML4Ga6ucaI= X-Google-Smtp-Source: AK7set+LlV5CIyiauVOMC8t3dQe7Rg9cos5bcrkS51O2YfnuFIJ3dELTYBBXuTqJ5VVhAjSFk/QYzw== X-Received: by 2002:a17:906:9acf:b0:8b1:756c:1a30 with SMTP id ah15-20020a1709069acf00b008b1756c1a30mr1473562ejc.59.1678781362458; Tue, 14 Mar 2023 01:09:22 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:6932:5570:6254:9edd]) by smtp.gmail.com with ESMTPSA id co2-20020a0564020c0200b004fce9ff4830sm584872edb.88.2023.03.14.01.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:09:22 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Jassi Brar , Rob Herring , Krzysztof Kozlowski , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 03/13] dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks Date: Tue, 14 Mar 2023 09:09:07 +0100 Message-Id: <20230314080917.68246-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230314080917.68246-1-krzysztof.kozlowski@linaro.org> References: <20230314080917.68246-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Rework the compatibles and group devices which have similar interface (same from Linux driver point of view) as compatible. This allows smaller of_device_id table in the Linux driver and smaller allOf:if:then: constraints. Signed-off-by: Krzysztof Kozlowski --- .../mailbox/qcom,apcs-kpss-global.yaml | 58 ++++++++++--------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml index 4d2f408a5efb..792778924eb3 100644 --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml @@ -19,32 +19,46 @@ properties: - items: - enum: - qcom,ipq5332-apcs-apps-global + - qcom,ipq8074-apcs-apps-global - const: qcom,ipq6018-apcs-apps-global - items: - enum: - - qcom,ipq6018-apcs-apps-global - - qcom,ipq8074-apcs-apps-global - - qcom,msm8996-apcs-hmss-global + - qcom,msm8939-apcs-kpss-global + - qcom,qcs404-apcs-apps-global + - const: qcom,msm8916-apcs-kpss-global + - const: syscon + - items: + - enum: + - qcom,msm8976-apcs-kpss-global + - const: qcom,msm8994-apcs-kpss-global + - const: syscon + - items: + - enum: - qcom,msm8998-apcs-hmss-global - qcom,qcm2290-apcs-hmss-global - - qcom,sc7180-apss-shared - - qcom,sc8180x-apss-shared - qcom,sdm660-apcs-hmss-global - - qcom,sdm845-apss-shared - qcom,sm4250-apcs-hmss-global - - qcom,sm6125-apcs-hmss-global - qcom,sm6115-apcs-hmss-global + - qcom,sm6125-apcs-hmss-global + - const: qcom,msm8994-apcs-kpss-global + - items: + - enum: + - qcom,sc7180-apss-shared + - qcom,sc8180x-apss-shared - qcom,sm8150-apss-shared + - const: qcom,sdm845-apss-shared - items: - enum: - qcom,msm8916-apcs-kpss-global - - qcom,msm8939-apcs-kpss-global - qcom,msm8953-apcs-kpss-global - - qcom,msm8976-apcs-kpss-global - qcom,msm8994-apcs-kpss-global - - qcom,qcs404-apcs-apps-global - qcom,sdx55-apcs-gcc - const: syscon + - enum: + - qcom,ipq6018-apcs-apps-global + - qcom,msm8996-apcs-hmss-global + - qcom,sdm845-apss-shared + reg: maxItems: 1 @@ -74,10 +88,9 @@ allOf: - if: properties: compatible: - enum: - - qcom,msm8916-apcs-kpss-global - - qcom,msm8939-apcs-kpss-global - - qcom,qcs404-apcs-apps-global + contains: + enum: + - qcom,msm8916-apcs-kpss-global then: properties: clocks: @@ -88,6 +101,7 @@ allOf: items: - const: pll - const: aux + - if: properties: compatible: @@ -106,13 +120,13 @@ allOf: - const: ref - const: pll - const: aux + - if: properties: compatible: contains: enum: - qcom,ipq6018-apcs-apps-global - - qcom,ipq8074-apcs-apps-global then: properties: clocks: @@ -129,19 +143,9 @@ allOf: compatible: enum: - qcom,msm8953-apcs-kpss-global - - qcom,msm8976-apcs-kpss-global - qcom,msm8994-apcs-kpss-global - qcom,msm8996-apcs-hmss-global - - qcom,msm8998-apcs-hmss-global - - qcom,qcm2290-apcs-hmss-global - - qcom,sc7180-apss-shared - - qcom,sc8180x-apss-shared - - qcom,sdm660-apcs-hmss-global - qcom,sdm845-apss-shared - - qcom,sm4250-apcs-hmss-global - - qcom,sm6115-apcs-hmss-global - - qcom,sm6125-apcs-hmss-global - - qcom,sm8150-apss-shared then: properties: clocks: false @@ -153,7 +157,6 @@ allOf: contains: enum: - qcom,ipq6018-apcs-apps-global - - qcom,ipq8074-apcs-apps-global then: properties: '#clock-cells': @@ -188,7 +191,8 @@ examples: #define GCC_APSS_AHB_CLK_SRC 1 #define GCC_GPLL0_AO_OUT_MAIN 123 apcs: mailbox@b011000 { - compatible = "qcom,qcs404-apcs-apps-global", "syscon"; + compatible = "qcom,qcs404-apcs-apps-global", + "qcom,msm8916-apcs-kpss-global", "syscon"; reg = <0x0b011000 0x1000>; #mbox-cells = <1>; clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>;