Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp221178ybr; Fri, 22 May 2020 05:11:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx87hl5aK4bX84CsYdmZTHSrDwTLsJUFGArlyfW6PMjKVWfPE5cLfd28Vl3J7yMICB2L+rj X-Received: by 2002:a17:906:714c:: with SMTP id z12mr7554903ejj.435.1590149512489; Fri, 22 May 2020 05:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590149512; cv=none; d=google.com; s=arc-20160816; b=VzHnDjBifq8ZukdXDfDDmjs0UVjH+tm87GRGTsVauz/lnGWBZ0b30o41vV0OK5jDfZ tF87FX3vdbnn2nAWpoFn4Gg+TDrqoWoOoTV5chjY7QwwVhJCvhrnlbAHH6uLJfVU9QiM tXQ24jC6EFpSHOtf/zOYZbs/u6ch/z9OPtccPyPse5fB4fyIeZMCmTkkWjKyIFgv5mgF n4zBjcYvw3WDi5o6Id62x5rFWMhNzpEV1FFKTrmC+ZYM1MAsM5+MyYlIzbhWwI1e+1uO Mmn8iPAbbaYjWJnuVV7saJr//PEPyo9F6G0J80dKRnsea1o6+9HVXKLgry6nYUGem2f9 qAyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MAzJNRl7denaMJiKd3+TRewxkBzsyKS+1FyrOm5aCWE=; b=lBA35MXYjJdr7hJVlqgfPq7981XWtSZWNhShedXNUNTmkgqR8nJIrJG5Lp/kPLQy+t 3STsgz9CPWftcJ9mXz8HFldiTNr0pMGbf8lq+iRwfURo0RaQD8zUKgpu3eMCeTEmQWiu WgyO+6Hhopk2/VMkVSgef09Gmkqm10trSg9ji426fUS5G67Yp1IPmvWukaw7mU59Urks wkldrex7h2GpCkmBxGT/4QS2odDjkBB1CNHw7MnLf4VXPXxBzMvrAeaeY9kROYEPqt51 fIZwLek7dRAe4fvOF99N/SItuqC9Pjo2rRjgyQeX2pGJXOpRivZMf4jD9xCIw4rcHguX frew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="ive/SXQx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si4976815ejw.152.2020.05.22.05.11.28; Fri, 22 May 2020 05:11:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="ive/SXQx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729334AbgEVMH1 (ORCPT + 99 others); Fri, 22 May 2020 08:07:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729053AbgEVMHY (ORCPT ); Fri, 22 May 2020 08:07:24 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E92D1C08C5C0 for ; Fri, 22 May 2020 05:07:22 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id h4so8418115wmb.4 for ; Fri, 22 May 2020 05:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MAzJNRl7denaMJiKd3+TRewxkBzsyKS+1FyrOm5aCWE=; b=ive/SXQxt5s2pDXP4TWmu4Ys9wRpRSQymcCM5LMgqsL9p5NnfsCO/xrcOMXD8WcBeR olaAhRkbe4zMwWYqOPs93rQrj/6pZM9vrvFpw1n7EzwShF042tSv4YA/H2mGuOoGL/Nn gAkMNCW2yaJnKt014rskf3LvJaOz8nsfWTiHPwLx8hGkxR9acPnN5D8aldoSanXWfxjC VQD5/uf8dOTPDoYRBDEq4JJhBlyC7GfiTFbFBYzjj05z0FtnJDSoJSJ4KU/sDyzP+iiI B7E5J0M4oupKLsSq+sAVPsjVJZZ2VMiVhOklYFACnj/RrN3QIW5MuieIH6pqY+YXYmWP 57bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MAzJNRl7denaMJiKd3+TRewxkBzsyKS+1FyrOm5aCWE=; b=o351ChmaCMS7HeVq6IZX3tyaRf81YMBOyE9KMlCzc2DuZ++aYW7zOLTZUZvCHrjS+2 sddphjeAOgTrFNStqoD2S+T2jDgij9Wh4DLrRik+264znOO2cYK0bnFmCG8vdkXbnAMp BdcLKSlNjWgxe/dlO4ew1B/oQmRVQSjYrYO02WPD6ziQPeSDgEDAo7tndNJBRRc8l0uR /ko/2NS6DYcNiaM/RImHM/geiju7aGvaPROfbzhVPF5cydmqeBeavHzI7v/txdFqvn33 wBTr6BlWpfiNYycd4YyS+b6tlkZeq2SGCgCgruGbzTlcW1un79Apw5ScdKe39qxi9d/5 a2ww== X-Gm-Message-State: AOAM530PmDvOWKDMQgsI4RJD98pgVUEgLwdSf8eJnAUJ68Q3YQBNgn/d 3ajNVXvcdkHAMxvIFY1xTPyLtQ== X-Received: by 2002:a1c:2707:: with SMTP id n7mr13564997wmn.147.1590149241597; Fri, 22 May 2020 05:07:21 -0700 (PDT) Received: from localhost.localdomain (lfbn-nic-1-65-232.w2-15.abo.wanadoo.fr. [2.15.156.232]) by smtp.gmail.com with ESMTPSA id f128sm9946233wme.1.2020.05.22.05.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 05:07:21 -0700 (PDT) From: Bartosz Golaszewski To: Rob Herring , "David S . Miller" , Matthias Brugger , John Crispin , Sean Wang , Mark Lee , Jakub Kicinski , Arnd Bergmann , Fabien Parent , Heiner Kallweit , Edwin Peer Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Stephane Le Provost , Pedro Tsai , Andrew Perepech , Bartosz Golaszewski Subject: [PATCH v5 01/11] dt-bindings: convert the binding document for mediatek PERICFG to yaml Date: Fri, 22 May 2020 14:06:50 +0200 Message-Id: <20200522120700.838-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200522120700.838-1-brgl@bgdev.pl> References: <20200522120700.838-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Convert the DT binding .txt file for MediaTek's peripheral configuration controller to YAML. There's one special case where the compatible has three positions. Otherwise, it's a pretty normal syscon. Signed-off-by: Bartosz Golaszewski --- .../arm/mediatek/mediatek,pericfg.txt | 36 ----------- .../arm/mediatek/mediatek,pericfg.yaml | 63 +++++++++++++++++++ 2 files changed, 63 insertions(+), 36 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt deleted file mode 100644 index ecf027a9003a..000000000000 --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt +++ /dev/null @@ -1,36 +0,0 @@ -Mediatek pericfg controller -=========================== - -The Mediatek pericfg controller provides various clocks and reset -outputs to the system. - -Required Properties: - -- compatible: Should be one of: - - "mediatek,mt2701-pericfg", "syscon" - - "mediatek,mt2712-pericfg", "syscon" - - "mediatek,mt7622-pericfg", "syscon" - - "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon" - - "mediatek,mt7629-pericfg", "syscon" - - "mediatek,mt8135-pericfg", "syscon" - - "mediatek,mt8173-pericfg", "syscon" - - "mediatek,mt8183-pericfg", "syscon" -- #clock-cells: Must be 1 -- #reset-cells: Must be 1 - -The pericfg 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: - -pericfg: power-controller@10003000 { - compatible = "mediatek,mt8173-pericfg", "syscon"; - reg = <0 0x10003000 0 0x1000>; - #clock-cells = <1>; - #reset-cells = <1>; -}; diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml new file mode 100644 index 000000000000..1340c6288024 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/arm/mediatek/mediatek,pericfg.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: MediaTek Peripheral Configuration Controller + +maintainers: + - Bartosz Golaszewski + +description: + The Mediatek pericfg controller provides various clocks and reset outputs + to the system. + +properties: + compatible: + oneOf: + - items: + - enum: + - mediatek,mt2701-pericfg + - mediatek,mt2712-pericfg + - mediatek,mt7622-pericfg + - mediatek,mt7629-pericfg + - mediatek,mt8135-pericfg + - mediatek,mt8173-pericfg + - mediatek,mt8183-pericfg + - const: syscon + - items: + # Special case for mt7623 for backward compatibility + - const: mediatek,mt7623-pericfg + - const: mediatek,mt2701-pericfg + - const: syscon + + reg: + maxItems: 1 + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 1 + +required: + - compatible + - reg + +examples: + - | + pericfg@10003000 { + compatible = "mediatek,mt8173-pericfg", "syscon"; + reg = <0x10003000 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + }; + + - | + pericfg@10003000 { + compatible = "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon"; + reg = <0x10003000 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + }; -- 2.25.0