Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1889007rwd; Wed, 17 May 2023 02:52:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ41gfvBU3MLuLJEvvMCipLlFHbY2erjigw0pQEvhwJOolfS/eUqt4/P0/G6pEqh1fDbSV/u X-Received: by 2002:a05:6a00:218f:b0:646:b944:4e1d with SMTP id h15-20020a056a00218f00b00646b9444e1dmr162509pfi.32.1684317168850; Wed, 17 May 2023 02:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684317168; cv=none; d=google.com; s=arc-20160816; b=j903zNs8NvBGmQ5jtF7S9ADxxkw9K+1UFbqap9UA9OgTQbXmsGHnZsOi6yHAlpWtgz MSh1Xx64KcGIbcnwWY+KIv2bl6iez0jRm8cezVp17HRawW5RclWAU81XkCGpDCva62cN q6C7Ewsfh/6ENwBYp6zy6FbywlZ8m0pidaUsopJ8rFqkTzBbiNy5PC3CYnWObwGSP4/S SH7RJIi8+Fu8YekQt/yoYH2yuEzboCe0GeDa4Wkv6D8MTK3Yu0zYgfyitQxca2oKt2AW gOsBVnUxdCkwG9/neI2s4GC87AZV3qKMx9C9X+KMYLWnk7B4sK98LhRS9oQjJ0YYg+va J/jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VG6+X9TEqWCvro85jir+9lVIvCdvMkpTzqCnvHpL1VE=; b=UuYXini2BwRFuEw6dIC8ltuRfwD3THnzZrN176Xpmn/vOCA5+iXGofB6AUAVdLWaPz g5TRO1YOmaYdHIqfT23z1eXE46qOi0RIo81F3v+MXCg+7eo5tA9FsaQtjYmsyAWM8qzA 2yryDPHK10oW9T7+NbG14KEHHLMALdAGSxIMmx4w0i+gzFj6D8ZDPae+JaBcryN4RPIn VxClwXv0KoQlxFcojGN8mdxW/UbUiVBsb28M+z9AiRpdbq88oO6432JByVVD7cluJ9mM GQzrS+IVRuJ4rF/75D8PoXRoyHdIPKFRuAKjFzE7hWYPF112EH/o4NJe0mHvFhS0tHH8 74EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=yCWCp+1E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s80-20020a632c53000000b0052c9fa0034fsi22024219pgs.699.2023.05.17.02.52.35; Wed, 17 May 2023 02:52:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=yCWCp+1E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230063AbjEQJmf (ORCPT + 99 others); Wed, 17 May 2023 05:42:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229758AbjEQJm3 (ORCPT ); Wed, 17 May 2023 05:42:29 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1D3240E7; Wed, 17 May 2023 02:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1684316545; x=1715852545; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PbsDxDHdwQqtu3j7vU1cmMCOIEl7ciPjkckHyxO7hqM=; b=yCWCp+1EnZWPRRRRO6H+fitol4RwUG/CgG68ZU7+XU7SH24T5i6MDR0f Ebw/eXCOU8r3K0FcPLklK8vBKlTyWyZioSU9LCSg4ECTYpAYUd/1kAMQV Ao6Gh4lEj7mrb8hVOZ0Mzt1woR4m9n2h8uzeLNWk9hw1HLeLLgcbDYUqY 18g97R6K/idREYmXlyzAp2w1mVLWDik3sfXH8Xazrf1NR98r5ni75YeQ4 OIF0AggdyV5e07IgOMi36orDC7X/GnQ5y0RyTjqWG8g5jwgJ667Df2ggR 5eoFSxPtrLVwOBLXR1ESbOzIHDJXdMbPzK+DrpsRTcsKX+TqftKUsOVst Q==; X-IronPort-AV: E=Sophos;i="5.99,281,1677567600"; d="scan'208";a="225726256" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 May 2023 02:42:24 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 17 May 2023 02:42:24 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Wed, 17 May 2023 02:42:20 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , , Claudiu Beznea Subject: [PATCH v5 2/5] dt-bindings: clocks: atmel,at91rm9200-pmc: convert to yaml Date: Wed, 17 May 2023 12:41:16 +0300 Message-ID: <20230517094119.2894220-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230517094119.2894220-1-claudiu.beznea@microchip.com> References: <20230517094119.2894220-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert Atmel PMC documentation to yaml. Along with it clock names were adapted according to the current available device trees as different controller versions accept different clock (some of them have 3 clocks as input, some has 2 clocks as inputs and some with 2 input clocks uses different clock names). Signed-off-by: Claudiu Beznea --- .../devicetree/bindings/clock/at91-clock.txt | 28 ---- .../bindings/clock/atmel,at91rm9200-pmc.yaml | 154 ++++++++++++++++++ 2 files changed, 154 insertions(+), 28 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt index 13f45db3b66d..57394785d3b0 100644 --- a/Documentation/devicetree/bindings/clock/at91-clock.txt +++ b/Documentation/devicetree/bindings/clock/at91-clock.txt @@ -28,31 +28,3 @@ For example: #clock-cells = <0>; }; -Power Management Controller (PMC): - -Required properties: -- compatible : shall be "atmel,-pmc", "syscon" or - "microchip,sam9x60-pmc" - can be: at91rm9200, at91sam9260, at91sam9261, - at91sam9263, at91sam9g45, at91sam9n12, at91sam9rl, at91sam9g15, - at91sam9g25, at91sam9g35, at91sam9x25, at91sam9x35, at91sam9x5, - sama5d2, sama5d3 or sama5d4. -- #clock-cells : from common clock binding; shall be set to 2. The first entry - is the type of the clock (core, system, peripheral or generated) and the - second entry its index as provided by the datasheet -- clocks : Must contain an entry for each entry in clock-names. -- clock-names: Must include the following entries: "slow_clk", "main_xtal" - -Optional properties: -- atmel,osc-bypass : boolean property. Set this when a clock signal is directly - provided on XIN. - -For example: - pmc: pmc@f0018000 { - compatible = "atmel,sama5d4-pmc", "syscon"; - reg = <0xf0018000 0x120>; - interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; - #clock-cells = <2>; - clocks = <&clk32k>, <&main_xtal>; - clock-names = "slow_clk", "main_xtal"; - }; diff --git a/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml b/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml new file mode 100644 index 000000000000..c1bdcd9058ed --- /dev/null +++ b/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml @@ -0,0 +1,154 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/atmel,at91rm9200-pmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel Power Management Controller (PMC) + +maintainers: + - Claudiu Beznea + +description: + The power management controller optimizes power consumption by controlling all + system and user peripheral clocks. The PMC enables/disables the clock inputs + to many of the peripherals and to the processor. + +properties: + compatible: + oneOf: + - items: + - const: atmel,at91sam9g20-pmc + - const: atmel,at91sam9260-pmc + - const: syscon + - items: + - enum: + - atmel,at91sam9g15-pmc + - atmel,at91sam9g25-pmc + - atmel,at91sam9g35-pmc + - atmel,at91sam9x25-pmc + - atmel,at91sam9x35-pmc + - const: atmel,at91sam9x5-pmc + - const: syscon + - items: + - enum: + - atmel,at91rm9200-pmc + - atmel,at91sam9260-pmc + - atmel,at91sam9g45-pmc + - atmel,at91sam9n12-pmc + - atmel,at91sam9rl-pmc + - atmel,at91sam9x5-pmc + - atmel,sama5d2-pmc + - atmel,sama5d3-pmc + - atmel,sama5d4-pmc + - microchip,sam9x60-pmc + - microchip,sama7g5-pmc + - const: syscon + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#clock-cells": + description: | + - 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM, + PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined + in ) + - 2nd cell is the clock identifier as defined in + + pmc: clock-controller@f0018000 { + compatible = "atmel,sama5d4-pmc", "syscon"; + reg = <0xf0018000 0x120>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; + #clock-cells = <2>; + clocks = <&clk32k>, <&main_xtal>; + clock-names = "slow_clk", "main_xtal"; + }; + +... -- 2.34.1