From patchwork Sun Apr 24 08:46:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 12824806 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B79BCC433F5 for ; Sun, 24 Apr 2022 08:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ysCCw+1SDBJPINPmpuKfbcQgvRJvTcJaRByusGVkxv0=; b=4kGXJXmn55SvKE vX/PFeqmLTXoVzN13xRkl9xtKasE3KcXWhcCqJgbz66c9JNIymvwNeB/4rLmeurx7zZo1P3w3envc 4M80F1YCV+wkrUUK8jLBJQbQu6NBduw7REPcbW7zn1iSMMNNKlLx5u1zlzQVDDUX+tDoz0K9GhOXz z9f8Pv5EmufxT0+OINGQcDzwLQ4q53oORIlK4I2umFjHXe6tmMMXkYmliTHz6vi8wYGb0jMltPRb1 MS/OfSEOgqg7cjE7JpnvZHv7sS5zfXVWaMrxN+ckYjLFcOnD+QFk5zgXd2jLzWPb6ChlZ0yJNrwIk QroDJm7KfQgFhjZmfYtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niXwy-006A69-93; Sun, 24 Apr 2022 08:50:36 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niXwr-006A2o-0c; Sun, 24 Apr 2022 08:50:30 +0000 Received: by mail-ej1-x630.google.com with SMTP id y3so3778219ejo.12; Sun, 24 Apr 2022 01:50:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9hGLWJes4t+4tQMjv3m5RoPb2lvXCIf1ih3dR2aQ4Qc=; b=anaLUvD7MuN2zlKzDM7sN/GC+fVdQNLICiJb/sPF1fU8HlUvcyUizTZbHybv+PT4KK tO+dpwAc45opffGIyePpf3pm7WtM2xvqQ2IVVk+9MiS+DM3APDdmhuOjW9HTvfCTK8WR INcFWxBxztZHMSBcAysEUfq4kcgduFwx4yWcvSWCjD+AzeaO+7/wjwiO6/4LwZPEdjLO 9p1QrVYJ4s96hA8dov3IkIqWp5yU7rfXNE0ln8rGC7pr/ObS2GaQp6/uCUmQMq9LrUcw ilYAvsQ3LPxy18gTQnGbs7UCK/SaRwzpBvEoSd6RdZdqDM7OGZkDkru6YYUxjUC185on vKfA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=9hGLWJes4t+4tQMjv3m5RoPb2lvXCIf1ih3dR2aQ4Qc=; b=fnbVAMb7DmH9uIwOVI19QsPv7NVyiyOv4UB+A2lqmBxRt+rvi/58qeuf29yzTBATV/ vrjzVopKIX72AeN6JLmuJ6RAgbsB//2+FHT5/l0QQ1wJAlL+XoeDeTXBmt2MgFRO5/eT XMr4bpQSyuRizKVzEyxsHnepuRrgXU/gjmom8U5pY9Z/udCqrXkLufBNa67bW8ZrqgPL LGOd0jRRjS7qXuL5in3/Wawub2NJRKtJuuTVeAARFYdohEl39OjC2paSBgCbPz9Q+gOW BURBZDh9hcmd4zZwrYToHd5huxSuf88qkOrOYI9rtc8eToS2mHIG8ACHV3jedahPic6f 3vnA== X-Gm-Message-State: AOAM5307uAHk/kYuD4P4u6iKrQ2otadXs6C0CpRE1riDGg4SdIuO+oKn a5XrGxyeO6k3NYJBzyeJgOk= X-Google-Smtp-Source: ABdhPJwBtC5p5qrhVd/u7qXx7lSPfmACDBIYD3HWFPMHT5rAadi8AQ5JK+DpO9egTuehUQK3iKG09g== X-Received: by 2002:a17:907:7f8f:b0:6f0:e67:e3a7 with SMTP id qk15-20020a1709077f8f00b006f00e67e3a7mr11700601ejc.517.1650790226555; Sun, 24 Apr 2022 01:50:26 -0700 (PDT) Received: from localhost.localdomain ([138.199.7.245]) by smtp.gmail.com with ESMTPSA id gy10-20020a170906f24a00b006e894144707sm2435971ejb.53.2022.04.24.01.50.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Apr 2022 01:50:26 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd , Matthias Brugger Cc: Sam Shih , Ryder Lee , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yassine Oudjana , Yassine Oudjana Subject: [PATCH v2 1/3] dt-bindings: arm: mediatek: topckgen: Convert to DT schema Date: Sun, 24 Apr 2022 12:46:45 +0400 Message-Id: <20220424084647.76577-2-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220424084647.76577-1-y.oudjana@protonmail.com> References: <20220424084647.76577-1-y.oudjana@protonmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220424_015029_117331_1007E2B7 X-CRM114-Status: GOOD ( 16.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yassine Oudjana Convert topckgen bindings to DT schema format. MT2701, MT7623 and MT7629 device trees currently have the syscon compatible without it being mentioned in the old DT bindings file which introduces dtbs_check errors when converting to DT schema as-is, so mediatek,mt2701-topckgen and mediatek,mt7629-topckgen are placed in the last items list with the syscon compatible, and syscon is added to the mediatek,mt7623-topckgen list. Signed-off-by: Yassine Oudjana Reviewed-by: Krzysztof Kozlowski --- .../arm/mediatek/mediatek,topckgen.txt | 35 ----------- .../bindings/clock/mediatek,topckgen.yaml | 61 +++++++++++++++++++ 2 files changed, 61 insertions(+), 35 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt create mode 100644 Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt deleted file mode 100644 index b82422bb717f..000000000000 --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt +++ /dev/null @@ -1,35 +0,0 @@ -Mediatek topckgen controller -============================ - -The Mediatek topckgen controller provides various clocks to the system. - -Required Properties: - -- compatible: Should be one of: - - "mediatek,mt2701-topckgen" - - "mediatek,mt2712-topckgen", "syscon" - - "mediatek,mt6765-topckgen", "syscon" - - "mediatek,mt6779-topckgen", "syscon" - - "mediatek,mt6797-topckgen" - - "mediatek,mt7622-topckgen" - - "mediatek,mt7623-topckgen", "mediatek,mt2701-topckgen" - - "mediatek,mt7629-topckgen" - - "mediatek,mt7986-topckgen", "syscon" - - "mediatek,mt8135-topckgen" - - "mediatek,mt8167-topckgen", "syscon" - - "mediatek,mt8173-topckgen" - - "mediatek,mt8183-topckgen", "syscon" - - "mediatek,mt8516-topckgen" -- #clock-cells: Must be 1 - -The topckgen controller uses the common clk binding from -Documentation/devicetree/bindings/clock/clock-bindings.txt -The available clocks are defined in dt-bindings/clock/mt*-clk.h. - -Example: - -topckgen: power-controller@10000000 { - compatible = "mediatek,mt8173-topckgen"; - reg = <0 0x10000000 0 0x1000>; - #clock-cells = <1>; -}; diff --git a/Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml b/Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml new file mode 100644 index 000000000000..5b8b37a2e594 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/clock/mediatek,topckgen.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: MediaTek Top Clock Generator Controller + +maintainers: + - Michael Turquette + - Stephen Boyd + +description: + The Mediatek topckgen controller provides various clocks to the system. + The clock values can be found in . + +properties: + compatible: + oneOf: + - enum: + - mediatek,mt6797-topckgen + - mediatek,mt7622-topckgen + - mediatek,mt8135-topckgen + - mediatek,mt8173-topckgen + - mediatek,mt8516-topckgen + - items: + - const: mediatek,mt7623-topckgen + - const: mediatek,mt2701-topckgen + - const: syscon + - items: + - enum: + - mediatek,mt2701-topckgen + - mediatek,mt2712-topckgen + - mediatek,mt6765-topckgen + - mediatek,mt6779-topckgen + - mediatek,mt7629-topckgen + - mediatek,mt7986-topckgen + - mediatek,mt8167-topckgen + - mediatek,mt8183-topckgen + - const: syscon + + reg: + maxItems: 1 + + '#clock-cells': + const: 1 + +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false + +examples: + - | + topckgen: clock-controller@10000000 { + compatible = "mediatek,mt8173-topckgen"; + reg = <0x10000000 0x1000>; + #clock-cells = <1>; + }; From patchwork Sun Apr 24 08:46:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 12824807 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7A90C433EF for ; Sun, 24 Apr 2022 08:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S9aNd6gLbQvGYNa2A9j7pIGKq5vNSYWEyHXAvfggtoI=; b=it/QMeFp3/pDqF O7Jt53iGFvq02o4dJPCRaVY5Ipkq2yJ+nQqzWuQqxUdcZweJzJ0hfzDrv9DU7V7/igIGxDIV2Sg+C +JvW17JccF3x5P0JMiWbe+ANCDbJxdvNf4gc7tqPlHDAIrPCMFAdTLFw4uPrw1sMK545mb7rvviKl NtwhL/tlTzuBe8jr7pXC/D0QymVKl2oCY+IvA32ULokokVObfnPQtYctqB+tWPb0SrkDaVwbP9+IH yocXhnsq2HzivGONedeO1u/70dQbw1TcO8Tnc4EOJkXD3lmbLQ8wQNCVDHAWHxt3geWFq6kqd60nL y4RzNLz64iZfnD0ozfWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niXxA-006AAu-Cn; Sun, 24 Apr 2022 08:50:48 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niXx0-006A6T-NQ; Sun, 24 Apr 2022 08:50:40 +0000 Received: by mail-ed1-x536.google.com with SMTP id a21so2981244edb.1; Sun, 24 Apr 2022 01:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8W5+Z8xfgLRyM84vERTjWIAUY1i0+LAcAHaXYj8ooeI=; b=HJVWKxSRlzwEzSVJHhutKBP5YESaIhaHsOm1yHH1zoXuYdANXyi5CYFsyyjoS0Io7F 6KMGQFIiDqaztWWrI5n2/l71KCG3en34KF7Cy7E3DTCMZb2NZXoc8brPMNPwYPTIM9c0 UtbB2zeFfLRMOKhH85AYwgcAbpiogLbrs+XnRpaftzE2FspRyIREhPAjn/VbxElB/A6i ZcavS0FjE0ZylygFWZpSO4/QVz/2FG7sQT0PgohsL5YM/NvmG5sWlIqlSiHea25e7DYE dMocobgbtDCT6+mZOHQFqPK1kqceHUVmR7Y8G7pa/jAAJZyV9AqYQExXMpfYS/wJcybs QOjA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=8W5+Z8xfgLRyM84vERTjWIAUY1i0+LAcAHaXYj8ooeI=; b=qZM4M16NVColRZTb5nnZx/HJyp1dB97wxIN9FIllQDxfh6Ui8m+7R0AiJLTcr+k9Z7 cYP0SRrB6B95UCR0boeqGdWUd5VduktmA9rgCHIjzB8KW94og9o6X83EWydWi9vq5Ar6 ppsqcylI1eVxnv75OrRvRQgudHvAL1pZOUjVl349h+DmlHW5yU1le3U5SdxJd1c2Yz9k vvneUCapL/I8caFLI8w2hl2Jm0DI7LNi1yVF0wJ6VPv4IWb811yibC6+y2QFZHcGYqgx 3tkamRssSK0hSVXOIyw2e92Iwmq7dEfta4PN6B95moAClrRZ6hgi96YhnisiMbsosbT4 20IA== X-Gm-Message-State: AOAM530AVxjCN+PVMRGDDLh4t24ImVhEbbMKNLUebFshtxzTMK4KdN3N BM+nTbp8mMh906kClznVGMI= X-Google-Smtp-Source: ABdhPJxCHoStiGRdxwMSQct0lwtQdbcFNX3mNwhWPi/jWgi/9gF+dy8m5VkfSZr+vzy2KVFkMVuC7g== X-Received: by 2002:a50:f69c:0:b0:425:c96a:5c09 with SMTP id d28-20020a50f69c000000b00425c96a5c09mr7964237edn.256.1650790236424; Sun, 24 Apr 2022 01:50:36 -0700 (PDT) Received: from localhost.localdomain ([138.199.7.245]) by smtp.gmail.com with ESMTPSA id gy10-20020a170906f24a00b006e894144707sm2435971ejb.53.2022.04.24.01.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Apr 2022 01:50:36 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd , Matthias Brugger Cc: Sam Shih , Ryder Lee , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yassine Oudjana , Yassine Oudjana Subject: [PATCH v2 2/3] dt-bindings: arm: mediatek: apmixedsys: Convert to DT schema Date: Sun, 24 Apr 2022 12:46:46 +0400 Message-Id: <20220424084647.76577-3-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220424084647.76577-1-y.oudjana@protonmail.com> References: <20220424084647.76577-1-y.oudjana@protonmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220424_015038_812040_06384EA9 X-CRM114-Status: GOOD ( 16.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yassine Oudjana Convert apmixedsys bindings to DT schema format. MT2701, MT7623 and MT7629 device trees currently have the syscon compatible without it being mentioned in the old DT bindings file which introduces dtbs_check errors when converting to DT schema as-is, so mediatek,mt2701-apmixedsys and mediatek,mt7629-apmixedsys are placed in the last items list with the syscon compatible, and syscon is added to the mediatek,mt7623-apmixedsys list. Signed-off-by: Yassine Oudjana Reviewed-by: Krzysztof Kozlowski --- .../arm/mediatek/mediatek,apmixedsys.txt | 35 ----------- .../bindings/clock/mediatek,apmixedsys.yaml | 61 +++++++++++++++++++ 2 files changed, 61 insertions(+), 35 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt create mode 100644 Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt deleted file mode 100644 index 3fa755866528..000000000000 --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt +++ /dev/null @@ -1,35 +0,0 @@ -Mediatek apmixedsys controller -============================== - -The Mediatek apmixedsys controller provides the PLLs to the system. - -Required Properties: - -- compatible: Should be one of: - - "mediatek,mt2701-apmixedsys" - - "mediatek,mt2712-apmixedsys", "syscon" - - "mediatek,mt6765-apmixedsys", "syscon" - - "mediatek,mt6779-apmixedsys", "syscon" - - "mediatek,mt6797-apmixedsys" - - "mediatek,mt7622-apmixedsys" - - "mediatek,mt7623-apmixedsys", "mediatek,mt2701-apmixedsys" - - "mediatek,mt7629-apmixedsys" - - "mediatek,mt7986-apmixedsys" - - "mediatek,mt8135-apmixedsys" - - "mediatek,mt8167-apmixedsys", "syscon" - - "mediatek,mt8173-apmixedsys" - - "mediatek,mt8183-apmixedsys", "syscon" - - "mediatek,mt8516-apmixedsys" -- #clock-cells: Must be 1 - -The apmixedsys controller uses the common clk binding from -Documentation/devicetree/bindings/clock/clock-bindings.txt -The available clocks are defined in dt-bindings/clock/mt*-clk.h. - -Example: - -apmixedsys: clock-controller@10209000 { - compatible = "mediatek,mt8173-apmixedsys"; - reg = <0 0x10209000 0 0x1000>; - #clock-cells = <1>; -}; diff --git a/Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml b/Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml new file mode 100644 index 000000000000..770546195fb5 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/clock/mediatek,apmixedsys.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: MediaTek AP Mixedsys Controller + +maintainers: + - Michael Turquette + - Stephen Boyd + +description: + The Mediatek apmixedsys controller provides PLLs to the system. + The clock values can be found in . + +properties: + compatible: + oneOf: + - enum: + - mediatek,mt6797-apmixedsys + - mediatek,mt7622-apmixedsys + - mediatek,mt7986-apmixedsys + - mediatek,mt8135-apmixedsys + - mediatek,mt8173-apmixedsys + - mediatek,mt8516-apmixedsys + - items: + - const: mediatek,mt7623-apmixedsys + - const: mediatek,mt2701-apmixedsys + - const: syscon + - items: + - enum: + - mediatek,mt2701-apmixedsys + - mediatek,mt2712-apmixedsys + - mediatek,mt6765-apmixedsys + - mediatek,mt6779-apmixedsys + - mediatek,mt7629-apmixedsys + - mediatek,mt8167-apmixedsys + - mediatek,mt8183-apmixedsys + - const: syscon + + reg: + maxItems: 1 + + '#clock-cells': + const: 1 + +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false + +examples: + - | + apmixedsys: clock-controller@10209000 { + compatible = "mediatek,mt8173-apmixedsys"; + reg = <0x10209000 0x1000>; + #clock-cells = <1>; + }; From patchwork Sun Apr 24 08:46:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 12824808 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18D4EC433F5 for ; Sun, 24 Apr 2022 08:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QaQjXU3zd8pJKnThakPgEAvQ0gkLJO4XPwRlS2YSgu4=; b=lJiL1AHmnV/nk6 ocINKxN+ZZuqC5EhluNaNeMsPRGA/L1YasI1s7JQYgGz1fGOdljBEht1Fj+Vhj8SR3h+PDfbVoIyO LsusSRMY/MqTCzAIlz6TcIypya//kMKt2qJVrHeIRIVcAfelokb9A1zYA67JPBrvR5ZB/ee9qMFTR sI74ALUtZmVE76cC2kLLtizvh0HFszhSC6kE8pKNzWbuSuuDH92WRPXpBbbGb9OhmKf/NEoXfuh+p hyr21aiqswbBmy2DxHpO6mLb8miwIcmrAAmeTHPf0Uw+cSEcUOUm0CP4EIBLtJmgXmLjC0c42R+Y7 2peMZ9CkjkvR+mvMa9hA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niXxO-006AHN-Gf; Sun, 24 Apr 2022 08:51:02 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niXx9-006AA2-3z; Sun, 24 Apr 2022 08:50:49 +0000 Received: by mail-ej1-x62c.google.com with SMTP id gh6so100126ejb.0; Sun, 24 Apr 2022 01:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SaSVAGu2XwyZao07Jymtbz3ykD0KKs6DAdj6tUH3Obk=; b=RjB5zd+KGvmtQtc+Xo1nuEZ0TX1aASqC0Ic8+GKMksqXdoF05w8NKSukK9SvU0bDHM HXBwIv8iOKcJrAiDJET8kX5a1Fqw86SsDwF2cMhj6u3pfVGWbbBOHe6YxtBtVov0nal2 ZuqTegYZwQPG7fzG1OP9oaM9RKhzR5xu7DY+TMtgkLGClKa1grpucmDBVRDWVw+k1+Qg b4aUVB15cZTvGptA1h8GwOJ6jlWWG/+ISKNI6hpUPVPiEzC0RN4G9iNvOJP+FFteSEMQ N3de/O6n/9pUrwqNjnI6hDTnsfkBfcDu6Yzh1hrxlPEcVMW8qyCJDFGuop2lfkFGtlz5 NZVA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=SaSVAGu2XwyZao07Jymtbz3ykD0KKs6DAdj6tUH3Obk=; b=tND1kXS70PLcWeqr9qxegvt7kwRztZJ76SP3EsQTflwluEqoXBKepucj3hXJGUgYqM ygmC0Vw9PtLrsdYLAlh/w0wDCOBX0o5quNnWMpBZMSJk8isxYJAeEhMf9lFxo71VfmZO 8C5jeHg+2b00QkP6+5tvqLnem3jI91cKronQ5BRuMQEuk1cbJNInJcqcoEOtLvC+M8XG uj0e0RaG2wmkweEhSz4cIT0RPDj0iXnKXMOkHibOQnCAsOpE+eLnoVv+TI3NpWhztFB3 //FNyqCLbFs9KCshO7hpozmfG96gYkVq5A8QW6J736O8ITDc8CXLqSf/N7W+a4+z3dzU lY5Q== X-Gm-Message-State: AOAM5309NGNmyYgD/nx/EMxbUfOjwgxmENMfV5+K5VsDUTWBs6bzGsQ8 Okyz3kojAPJokRGS3XkZxEM= X-Google-Smtp-Source: ABdhPJzzvMcUnsjX5m8kOC3MoubcHlQ48XHwvDcY9nmYjBRcmKIN1r5JLTL2A/SCNRd7aPswcvoc8w== X-Received: by 2002:a17:906:dc8b:b0:6ef:86e8:777 with SMTP id cs11-20020a170906dc8b00b006ef86e80777mr11822490ejc.326.1650790244772; Sun, 24 Apr 2022 01:50:44 -0700 (PDT) Received: from localhost.localdomain ([138.199.7.245]) by smtp.gmail.com with ESMTPSA id gy10-20020a170906f24a00b006e894144707sm2435971ejb.53.2022.04.24.01.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Apr 2022 01:50:44 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd , Matthias Brugger Cc: Sam Shih , Ryder Lee , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yassine Oudjana , Yassine Oudjana Subject: [PATCH v2 3/3] dt-bindings: arm: mediatek: infracfg: Convert to DT schema Date: Sun, 24 Apr 2022 12:46:47 +0400 Message-Id: <20220424084647.76577-4-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220424084647.76577-1-y.oudjana@protonmail.com> References: <20220424084647.76577-1-y.oudjana@protonmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220424_015047_230977_8E3E4629 X-CRM114-Status: GOOD ( 16.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yassine Oudjana Convert infracfg bindings to DT schema format. Not all drivers currently implement resets, so #reset-cells is made a required property only for those that do. Using power-controller in the example node name makes #power-domain-cells required causing a dt_binding_check error. To solve this, the node is renamed to syscon@10001000. Signed-off-by: Yassine Oudjana Reviewed-by: Krzysztof Kozlowski --- .../arm/mediatek/mediatek,infracfg.txt | 42 ---------- .../arm/mediatek/mediatek,infracfg.yaml | 81 +++++++++++++++++++ 2 files changed, 81 insertions(+), 42 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.yaml diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt deleted file mode 100644 index f66bd720571d..000000000000 --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt +++ /dev/null @@ -1,42 +0,0 @@ -Mediatek infracfg controller -============================ - -The Mediatek infracfg controller provides various clocks and reset -outputs to the system. - -Required Properties: - -- compatible: Should be one of: - - "mediatek,mt2701-infracfg", "syscon" - - "mediatek,mt2712-infracfg", "syscon" - - "mediatek,mt6765-infracfg", "syscon" - - "mediatek,mt6779-infracfg_ao", "syscon" - - "mediatek,mt6797-infracfg", "syscon" - - "mediatek,mt7622-infracfg", "syscon" - - "mediatek,mt7623-infracfg", "mediatek,mt2701-infracfg", "syscon" - - "mediatek,mt7629-infracfg", "syscon" - - "mediatek,mt7986-infracfg", "syscon" - - "mediatek,mt8135-infracfg", "syscon" - - "mediatek,mt8167-infracfg", "syscon" - - "mediatek,mt8173-infracfg", "syscon" - - "mediatek,mt8183-infracfg", "syscon" - - "mediatek,mt8516-infracfg", "syscon" -- #clock-cells: Must be 1 -- #reset-cells: Must be 1 - -The infracfg controller uses the common clk binding from -Documentation/devicetree/bindings/clock/clock-bindings.txt -The available clocks are defined in dt-bindings/clock/mt*-clk.h. -Also it uses the common reset controller binding from -Documentation/devicetree/bindings/reset/reset.txt. -The available reset outputs are defined in -dt-bindings/reset/mt*-resets.h - -Example: - -infracfg: power-controller@10001000 { - compatible = "mediatek,mt8173-infracfg", "syscon"; - reg = <0 0x10001000 0 0x1000>; - #clock-cells = <1>; - #reset-cells = <1>; -}; diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.yaml new file mode 100644 index 000000000000..8681b785ed6d --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/arm/mediatek/mediatek,infracfg.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: MediaTek Infrastructure System Configuration Controller + +maintainers: + - Matthias Brugger + +description: + The Mediatek infracfg controller provides various clocks and reset outputs + to the system. The clock values can be found in , + and reset values in and + . + +properties: + compatible: + oneOf: + - items: + - enum: + - mediatek,mt2701-infracfg + - mediatek,mt2712-infracfg + - mediatek,mt6765-infracfg + - mediatek,mt6779-infracfg_ao + - mediatek,mt6797-infracfg + - mediatek,mt7622-infracfg + - mediatek,mt7629-infracfg + - mediatek,mt7986-infracfg + - mediatek,mt8135-infracfg + - mediatek,mt8167-infracfg + - mediatek,mt8173-infracfg + - mediatek,mt8183-infracfg + - mediatek,mt8516-infracfg + - const: syscon + - items: + - const: mediatek,mt7623-infracfg + - const: mediatek,mt2701-infracfg + - const: syscon + + reg: + maxItems: 1 + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 1 + +required: + - compatible + - reg + - '#clock-cells' + +if: + properties: + compatible: + contains: + enum: + - mediatek,mt2701-infracfg + - mediatek,mt2712-infracfg + - mediatek,mt7622-infracfg + - mediatek,mt7986-infracfg + - mediatek,mt8135-infracfg + - mediatek,mt8173-infracfg + - mediatek,mt8183-infracfg +then: + required: + - '#reset-cells' + +additionalProperties: false + +examples: + - | + infracfg: clock-controller@10001000 { + compatible = "mediatek,mt8173-infracfg", "syscon"; + reg = <0x10001000 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + };