Message ID | 20230509052757.539274-3-claudiu.beznea@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2643532vqo; Mon, 8 May 2023 22:47:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dCVffYQ/mw36AaQTw0wSsk7cuhrrM9JqQ/zhkoHZIj9dez2JEBOu84ubO/1YMlm/3/1jY X-Received: by 2002:a05:6a20:9144:b0:f5:b7c9:57b5 with SMTP id x4-20020a056a20914400b000f5b7c957b5mr17472242pzc.24.1683611240835; Mon, 08 May 2023 22:47:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683611240; cv=none; d=google.com; s=arc-20160816; b=VVRu26Zagu5nL6csu8upglvGGc90pjHuu+ypvEiD9Y06JyhafIFIRY7++iBu1+a7cW h9lhzlz8lfyN4by1+N/Y9jN1m6LEqjK7VrYDn5Wh4fSOotP7g55k8V40Jh66phAej2Oy e+I3mEDKSjTHQ2J8f1MKuWe/MVrFXwC10w62PQwntZTGGjHn24pJXhZio8O1YPPBOkUP nSTDKcO0q7yyO3RCpEW5ivLWUzmjLVshQlaJAh4Pd0YxB4NhPrcaGu8Bl6PSwDioAjZO /1zJthQSRw9EiPPbfXkhKB3jj1EYr/GbVO00j02dFStl3dckvmNddHqeocuQguzCTZtW fBTA== 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=yQQ1EH3Yld1yZTdrREdNj1qex8hvo8ejpwBaIzt6+YM=; b=KjyYtf1tSJ/SWRhTKIVLuV5bfv8xBgL2V2pUgTC67j3XF/ica2dBfALiLH5ZTgo0hJ XDeJvB33Hv8JzEmZq1Eau+puvJrCW1ERGyKxMucSXcfLyH1KV6xk8x02K3TngwmP99jF s50kHaylvdUAri2QuMg2CRzt1/zex9HFIIrVigboxhS62LagnzjjMYOiXEAtRskaiYaM 0cKEg7gYFai8N/I8Wk3IxIDLdk4WPxD9tmXav9tt4hP3p4wbRfl7I3T2GPQkXfTnKixw mxOL3CORTs71/ApcWloxn//20yvOjOe7cvThjommA9OTLzg5P2sgJZ3pKj3O+wOdiLKf 0zyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="lh/wxEJs"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a63330d000000b005210b2d0807si690676pgz.678.2023.05.08.22.47.05; Mon, 08 May 2023 22:47:20 -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="lh/wxEJs"; 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 S234633AbjEIF23 (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Tue, 9 May 2023 01:28:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231468AbjEIF20 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 9 May 2023 01:28:26 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6EF99EE2; Mon, 8 May 2023 22:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1683610105; x=1715146105; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bENAJzvRNkr5XYz6N1cM2JkYR0rONMRzvQ2PM5HkuSg=; b=lh/wxEJs0JMKi1CWenw3vY82l6EezX/DIUYutyebSKNaHDGiu48b4cAt gZROnGZr3uPCqPVls6Cz+1anPanpdNiWYtFSzIeBEmMa1zTYYIuAseDQG gmY37YK1hgp6O5WQ56Iywq0AsL9F3FLafnSSEnyc0P/FjCmsgtIpiOoT+ HifOgSPCDpPscf2aDPm6/unl/ZmPVjqVtyRfyCPBWMCyaHlNJg/y6jmFs f8+/Hs2T68FnENL1lBLMo8nTsmqIQTAErWH4xkMlfdhcp8bQc2sMiu9/B WFIKuktuE5JsTL2X/l76WIOCRZ1scHBI9rwqbguAKnBMLFHCO7sqK9re9 w==; X-IronPort-AV: E=Sophos;i="5.99,261,1677567600"; d="scan'208";a="210291735" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 May 2023 22:28:24 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 8 May 2023 22:28:23 -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; Mon, 8 May 2023 22:28:18 -0700 From: Claudiu Beznea <claudiu.beznea@microchip.com> To: <mturquette@baylibre.com>, <sboyd@kernel.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com> CC: <linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, Claudiu Beznea <claudiu.beznea@microchip.com> Subject: [PATCH v3 2/5] dt-bindings: clocks: atmel,at91rm9200-pmc: convert to yaml Date: Tue, 9 May 2023 08:27:54 +0300 Message-ID: <20230509052757.539274-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230509052757.539274-1-claudiu.beznea@microchip.com> References: <20230509052757.539274-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765394340516000004?= X-GMAIL-MSGID: =?utf-8?q?1765394340516000004?= |
Series |
dt-bindings: clocks: at91: convert to yaml
|
|
Commit Message
Claudiu Beznea
May 9, 2023, 5:27 a.m. UTC
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 clocks (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 <claudiu.beznea@microchip.com>
---
.../devicetree/bindings/clock/at91-clock.txt | 28 ----
.../bindings/clock/atmel,at91rm9200-pmc.yaml | 152 ++++++++++++++++++
2 files changed, 152 insertions(+), 28 deletions(-)
create mode 100644 Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml
Comments
On 09/05/2023 07:27, Claudiu Beznea wrote: > 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 clocks (some of them > have 3 clocks as input, some has 2 clocks as inputs and some with 2 > input clocks uses different clock names). > Thank you for your patch. There is something to discuss/improve. > +title: Atmel Power Management Controller (PMC) > + > +maintainers: > + - Claudiu Beznea <claudiu.beznea@microchip.com> > + > +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: > + - enum: > + - atmel,at91sam9g15-pmc > + - atmel,at91sam9g20-pmc > + - atmel,at91sam9g25-pmc > + - atmel,at91sam9g35-pmc > + - atmel,at91sam9x25-pmc > + - atmel,at91sam9x35-pmc > + - enum: > + - atmel,at91sam9260-pmc > + - atmel,at91sam9x5-pmc I missed it last time - why you have two enums? We never talked about this. It's usually wrong... are you sure this is real hardware: atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc ? > + - const: syscon > + - items: > + - enum: > + - atmel,at91rm9200-pmc > + - atmel,at91sam9260-pmc > + - atmel,at91sam9g45-pmc > + - atmel,at91sam9n12-pmc > + - atmel,at91sam9rl-pmc > + - atmel,sama5d2-pmc > + - atmel,sama5d3-pmc > + - atmel,sama5d4-pmc > + - microchip,sam9x60-pmc > + - microchip,sama7g5-pmc > + - const: syscon > + Best regards, Krzysztof
On 09.05.2023 09:25, Krzysztof Kozlowski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On 09/05/2023 07:27, Claudiu Beznea wrote: >> 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 clocks (some of them >> have 3 clocks as input, some has 2 clocks as inputs and some with 2 >> input clocks uses different clock names). >> > > Thank you for your patch. There is something to discuss/improve. > >> +title: Atmel Power Management Controller (PMC) >> + >> +maintainers: >> + - Claudiu Beznea <claudiu.beznea@microchip.com> >> + >> +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: >> + - enum: >> + - atmel,at91sam9g15-pmc >> + - atmel,at91sam9g20-pmc >> + - atmel,at91sam9g25-pmc >> + - atmel,at91sam9g35-pmc >> + - atmel,at91sam9x25-pmc >> + - atmel,at91sam9x35-pmc >> + - enum: >> + - atmel,at91sam9260-pmc >> + - atmel,at91sam9x5-pmc > > I missed it last time - why you have two enums? We never talked about > this. It's usually wrong... are you sure this is real hardware: > atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc > ? I have 2 enums because there are some hardware covered by: "vendor-name,hardware-v1-pmc", "syscon" and some covered by: "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon". Many AT91 device trees compatibles were written in this way. Thus when new versions of the same IP has been introduced the drivers were not necessarily updated but the compatibles in device trees were updated e.g. with "vendor-name,hardware-v2-pmc" (the full compatible becoming "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon") and let the drivers fall back to already in driver supported compatible "vendor-name,hardware-v1-pmc", "syscon". In general v2 comes with new features in addition to v1. That way they AT91 ensures the ABI properties of DT and thus when the drivers were finally updated with the new features of the "vendor-name,hardware-v2-pmc" DT remained in place. Please let me know if these could be handled better in YAML. Thank you, Claudiu > > >> + - const: syscon >> + - items: >> + - enum: >> + - atmel,at91rm9200-pmc >> + - atmel,at91sam9260-pmc >> + - atmel,at91sam9g45-pmc >> + - atmel,at91sam9n12-pmc >> + - atmel,at91sam9rl-pmc >> + - atmel,sama5d2-pmc >> + - atmel,sama5d3-pmc >> + - atmel,sama5d4-pmc >> + - microchip,sam9x60-pmc >> + - microchip,sama7g5-pmc >> + - const: syscon >> + > > > Best regards, > Krzysztof >
On 10/05/2023 09:00, Claudiu.Beznea@microchip.com wrote: > On 09.05.2023 09:25, Krzysztof Kozlowski wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >> >> On 09/05/2023 07:27, Claudiu Beznea wrote: >>> 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 clocks (some of them >>> have 3 clocks as input, some has 2 clocks as inputs and some with 2 >>> input clocks uses different clock names). >>> >> >> Thank you for your patch. There is something to discuss/improve. >> >>> +title: Atmel Power Management Controller (PMC) >>> + >>> +maintainers: >>> + - Claudiu Beznea <claudiu.beznea@microchip.com> >>> + >>> +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: >>> + - enum: >>> + - atmel,at91sam9g15-pmc >>> + - atmel,at91sam9g20-pmc >>> + - atmel,at91sam9g25-pmc >>> + - atmel,at91sam9g35-pmc >>> + - atmel,at91sam9x25-pmc >>> + - atmel,at91sam9x35-pmc >>> + - enum: >>> + - atmel,at91sam9260-pmc >>> + - atmel,at91sam9x5-pmc >> >> I missed it last time - why you have two enums? We never talked about >> this. It's usually wrong... are you sure this is real hardware: >> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >> ? > > I have 2 enums because there are some hardware covered by: > "vendor-name,hardware-v1-pmc", "syscon" and some covered by: > "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon". The enum does not say this. At all. So again, answer, do not ignore: is this valid setup: atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc ? > > Many AT91 device trees compatibles were written in this way. Thus when new > versions of the same IP has been introduced the drivers were not > necessarily updated but the compatibles in device trees were updated e.g. > with "vendor-name,hardware-v2-pmc" (the full compatible becoming > "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon") and > let the drivers fall back to already in driver supported compatible > "vendor-name,hardware-v1-pmc", "syscon". In general v2 comes with new > features in addition to v1. > > That way they AT91 ensures the ABI properties of DT and thus when the > drivers were finally updated with the new features of the > "vendor-name,hardware-v2-pmc" DT remained in place. > > Please let me know if these could be handled better in YAML. enum + const + syscon, like every binding that type does in all bindings. Don't invent some new syntax. Best regards, Krzysztof
On 10.05.2023 10:06, Krzysztof Kozlowski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On 10/05/2023 09:00, Claudiu.Beznea@microchip.com wrote: >> On 09.05.2023 09:25, Krzysztof Kozlowski wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>> >>> On 09/05/2023 07:27, Claudiu Beznea wrote: >>>> 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 clocks (some of them >>>> have 3 clocks as input, some has 2 clocks as inputs and some with 2 >>>> input clocks uses different clock names). >>>> >>> >>> Thank you for your patch. There is something to discuss/improve. >>> >>>> +title: Atmel Power Management Controller (PMC) >>>> + >>>> +maintainers: >>>> + - Claudiu Beznea <claudiu.beznea@microchip.com> >>>> + >>>> +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: >>>> + - enum: >>>> + - atmel,at91sam9g15-pmc >>>> + - atmel,at91sam9g20-pmc >>>> + - atmel,at91sam9g25-pmc >>>> + - atmel,at91sam9g35-pmc >>>> + - atmel,at91sam9x25-pmc >>>> + - atmel,at91sam9x35-pmc >>>> + - enum: >>>> + - atmel,at91sam9260-pmc >>>> + - atmel,at91sam9x5-pmc >>> >>> I missed it last time - why you have two enums? We never talked about >>> this. It's usually wrong... are you sure this is real hardware: >>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>> ? >> >> I have 2 enums because there are some hardware covered by: >> "vendor-name,hardware-v1-pmc", "syscon" and some covered by: >> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon". > > The enum does not say this. At all. > > So again, answer, do not ignore: > is this valid setup: > atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc > ? Not w/o syscon. This is valid: compatible = "atmel,at91sam9g20-pmc", "atmel,at91sam9260-pmc", "syscon"; available in arch/arm/boot/dts/at91sam9g20.dtsi +45 > >> >> Many AT91 device trees compatibles were written in this way. Thus when new >> versions of the same IP has been introduced the drivers were not >> necessarily updated but the compatibles in device trees were updated e.g. >> with "vendor-name,hardware-v2-pmc" (the full compatible becoming >> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon") and >> let the drivers fall back to already in driver supported compatible >> "vendor-name,hardware-v1-pmc", "syscon". In general v2 comes with new >> features in addition to v1. >> >> That way they AT91 ensures the ABI properties of DT and thus when the >> drivers were finally updated with the new features of the >> "vendor-name,hardware-v2-pmc" DT remained in place. >> >> Please let me know if these could be handled better in YAML. > > > enum + const + syscon, like every binding that type does in all > bindings. Don't invent some new syntax. > > Best regards, > Krzysztof >
On 10/05/2023 09:14, Claudiu.Beznea@microchip.com wrote: > On 10.05.2023 10:06, Krzysztof Kozlowski wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >> >> On 10/05/2023 09:00, Claudiu.Beznea@microchip.com wrote: >>> On 09.05.2023 09:25, Krzysztof Kozlowski wrote: >>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>> >>>> On 09/05/2023 07:27, Claudiu Beznea wrote: >>>>> 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 clocks (some of them >>>>> have 3 clocks as input, some has 2 clocks as inputs and some with 2 >>>>> input clocks uses different clock names). >>>>> >>>> >>>> Thank you for your patch. There is something to discuss/improve. >>>> >>>>> +title: Atmel Power Management Controller (PMC) >>>>> + >>>>> +maintainers: >>>>> + - Claudiu Beznea <claudiu.beznea@microchip.com> >>>>> + >>>>> +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: >>>>> + - enum: >>>>> + - atmel,at91sam9g15-pmc >>>>> + - atmel,at91sam9g20-pmc >>>>> + - atmel,at91sam9g25-pmc >>>>> + - atmel,at91sam9g35-pmc >>>>> + - atmel,at91sam9x25-pmc >>>>> + - atmel,at91sam9x35-pmc >>>>> + - enum: >>>>> + - atmel,at91sam9260-pmc >>>>> + - atmel,at91sam9x5-pmc >>>> >>>> I missed it last time - why you have two enums? We never talked about >>>> this. It's usually wrong... are you sure this is real hardware: >>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>>> ? >>> >>> I have 2 enums because there are some hardware covered by: >>> "vendor-name,hardware-v1-pmc", "syscon" and some covered by: >>> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon". >> >> The enum does not say this. At all. >> >> So again, answer, do not ignore: >> is this valid setup: >> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >> ? > > Not w/o syscon. This is valid: Syscon is not important here, but indeed I missed it. > > compatible = "atmel,at91sam9g20-pmc", "atmel,at91sam9260-pmc", "syscon"; > > available in arch/arm/boot/dts/at91sam9g20.dtsi +45 Nice, so my random choice was actually correct. Ok, so another: atmel,at91sam9g15-pmc, atmel,at91sam9260-pmc, syscon Is it valid hardware? Best regards, Krzysztof
On 10.05.2023 10:58, Krzysztof Kozlowski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On 10/05/2023 09:14, Claudiu.Beznea@microchip.com wrote: >> On 10.05.2023 10:06, Krzysztof Kozlowski wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>> >>> On 10/05/2023 09:00, Claudiu.Beznea@microchip.com wrote: >>>> On 09.05.2023 09:25, Krzysztof Kozlowski wrote: >>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>>> >>>>> On 09/05/2023 07:27, Claudiu Beznea wrote: >>>>>> 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 clocks (some of them >>>>>> have 3 clocks as input, some has 2 clocks as inputs and some with 2 >>>>>> input clocks uses different clock names). >>>>>> >>>>> >>>>> Thank you for your patch. There is something to discuss/improve. >>>>> >>>>>> +title: Atmel Power Management Controller (PMC) >>>>>> + >>>>>> +maintainers: >>>>>> + - Claudiu Beznea <claudiu.beznea@microchip.com> >>>>>> + >>>>>> +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: >>>>>> + - enum: >>>>>> + - atmel,at91sam9g15-pmc >>>>>> + - atmel,at91sam9g20-pmc >>>>>> + - atmel,at91sam9g25-pmc >>>>>> + - atmel,at91sam9g35-pmc >>>>>> + - atmel,at91sam9x25-pmc >>>>>> + - atmel,at91sam9x35-pmc >>>>>> + - enum: >>>>>> + - atmel,at91sam9260-pmc >>>>>> + - atmel,at91sam9x5-pmc >>>>> >>>>> I missed it last time - why you have two enums? We never talked about >>>>> this. It's usually wrong... are you sure this is real hardware: >>>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>>>> ? >>>> >>>> I have 2 enums because there are some hardware covered by: >>>> "vendor-name,hardware-v1-pmc", "syscon" and some covered by: >>>> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon". >>> >>> The enum does not say this. At all. >>> >>> So again, answer, do not ignore: >>> is this valid setup: >>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>> ? >> >> Not w/o syscon. This is valid: > > Syscon is not important here, but indeed I missed it. > >> >> compatible = "atmel,at91sam9g20-pmc", "atmel,at91sam9260-pmc", "syscon"; >> >> available in arch/arm/boot/dts/at91sam9g20.dtsi +45 > > Nice, so my random choice was actually correct. Ok, so another: > > atmel,at91sam9g15-pmc, atmel,at91sam9260-pmc, syscon > > Is it valid hardware? This one, no. So, I guess, the wrong here is that there could be combinations that are not for actual hardware and yet considered valid by changes in this patch? > > Best regards, > Krzysztof >
On 10/05/2023 10:31, Claudiu.Beznea@microchip.com wrote: > On 10.05.2023 10:58, Krzysztof Kozlowski wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >> >> On 10/05/2023 09:14, Claudiu.Beznea@microchip.com wrote: >>> On 10.05.2023 10:06, Krzysztof Kozlowski wrote: >>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>> >>>> On 10/05/2023 09:00, Claudiu.Beznea@microchip.com wrote: >>>>> On 09.05.2023 09:25, Krzysztof Kozlowski wrote: >>>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>>>> >>>>>> On 09/05/2023 07:27, Claudiu Beznea wrote: >>>>>>> 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 clocks (some of them >>>>>>> have 3 clocks as input, some has 2 clocks as inputs and some with 2 >>>>>>> input clocks uses different clock names). >>>>>>> >>>>>> >>>>>> Thank you for your patch. There is something to discuss/improve. >>>>>> >>>>>>> +title: Atmel Power Management Controller (PMC) >>>>>>> + >>>>>>> +maintainers: >>>>>>> + - Claudiu Beznea <claudiu.beznea@microchip.com> >>>>>>> + >>>>>>> +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: >>>>>>> + - enum: >>>>>>> + - atmel,at91sam9g15-pmc >>>>>>> + - atmel,at91sam9g20-pmc >>>>>>> + - atmel,at91sam9g25-pmc >>>>>>> + - atmel,at91sam9g35-pmc >>>>>>> + - atmel,at91sam9x25-pmc >>>>>>> + - atmel,at91sam9x35-pmc >>>>>>> + - enum: >>>>>>> + - atmel,at91sam9260-pmc >>>>>>> + - atmel,at91sam9x5-pmc >>>>>> >>>>>> I missed it last time - why you have two enums? We never talked about >>>>>> this. It's usually wrong... are you sure this is real hardware: >>>>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>>>>> ? >>>>> >>>>> I have 2 enums because there are some hardware covered by: >>>>> "vendor-name,hardware-v1-pmc", "syscon" and some covered by: >>>>> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon". >>>> >>>> The enum does not say this. At all. >>>> >>>> So again, answer, do not ignore: >>>> is this valid setup: >>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>>> ? >>> >>> Not w/o syscon. This is valid: >> >> Syscon is not important here, but indeed I missed it. >> >>> >>> compatible = "atmel,at91sam9g20-pmc", "atmel,at91sam9260-pmc", "syscon"; >>> >>> available in arch/arm/boot/dts/at91sam9g20.dtsi +45 >> >> Nice, so my random choice was actually correct. Ok, so another: >> >> atmel,at91sam9g15-pmc, atmel,at91sam9260-pmc, syscon >> >> Is it valid hardware? > > This one, no. So, I guess, the wrong here is that there could be > combinations that are not for actual hardware and yet considered valid by > changes in this patch? I just don't understand why you have two enums. This is not a pattern which is allowed anywhere. It might appear but only as exception or mistake. Best regards, Krzysztof
On 10.05.2023 13:12, Krzysztof Kozlowski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On 10/05/2023 10:31, Claudiu.Beznea@microchip.com wrote: >> On 10.05.2023 10:58, Krzysztof Kozlowski wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>> >>> On 10/05/2023 09:14, Claudiu.Beznea@microchip.com wrote: >>>> On 10.05.2023 10:06, Krzysztof Kozlowski wrote: >>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>>> >>>>> On 10/05/2023 09:00, Claudiu.Beznea@microchip.com wrote: >>>>>> On 09.05.2023 09:25, Krzysztof Kozlowski wrote: >>>>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>>>>> >>>>>>> On 09/05/2023 07:27, Claudiu Beznea wrote: >>>>>>>> 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 clocks (some of them >>>>>>>> have 3 clocks as input, some has 2 clocks as inputs and some with 2 >>>>>>>> input clocks uses different clock names). >>>>>>>> >>>>>>> >>>>>>> Thank you for your patch. There is something to discuss/improve. >>>>>>> >>>>>>>> +title: Atmel Power Management Controller (PMC) >>>>>>>> + >>>>>>>> +maintainers: >>>>>>>> + - Claudiu Beznea <claudiu.beznea@microchip.com> >>>>>>>> + >>>>>>>> +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: >>>>>>>> + - enum: >>>>>>>> + - atmel,at91sam9g15-pmc >>>>>>>> + - atmel,at91sam9g20-pmc >>>>>>>> + - atmel,at91sam9g25-pmc >>>>>>>> + - atmel,at91sam9g35-pmc >>>>>>>> + - atmel,at91sam9x25-pmc >>>>>>>> + - atmel,at91sam9x35-pmc >>>>>>>> + - enum: >>>>>>>> + - atmel,at91sam9260-pmc >>>>>>>> + - atmel,at91sam9x5-pmc >>>>>>> >>>>>>> I missed it last time - why you have two enums? We never talked about >>>>>>> this. It's usually wrong... are you sure this is real hardware: >>>>>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>>>>>> ? >>>>>> >>>>>> I have 2 enums because there are some hardware covered by: >>>>>> "vendor-name,hardware-v1-pmc", "syscon" and some covered by: >>>>>> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon". >>>>> >>>>> The enum does not say this. At all. >>>>> >>>>> So again, answer, do not ignore: >>>>> is this valid setup: >>>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>>>> ? >>>> >>>> Not w/o syscon. This is valid: >>> >>> Syscon is not important here, but indeed I missed it. >>> >>>> >>>> compatible = "atmel,at91sam9g20-pmc", "atmel,at91sam9260-pmc", "syscon"; >>>> >>>> available in arch/arm/boot/dts/at91sam9g20.dtsi +45 >>> >>> Nice, so my random choice was actually correct. Ok, so another: >>> >>> atmel,at91sam9g15-pmc, atmel,at91sam9260-pmc, syscon >>> >>> Is it valid hardware? >> >> This one, no. So, I guess, the wrong here is that there could be >> combinations that are not for actual hardware and yet considered valid by >> changes in this patch? > > I just don't understand why you have two enums. This is not a pattern > which is allowed anywhere. It might appear but only as exception or mistake. I'm not at all an YAML expert and this is how I've managed to make dt_binding_check/dtbs_check happy. > > > Best regards, > Krzysztof >
On Thu, May 11, 2023 at 06:29:39AM +0000, Claudiu.Beznea@microchip.com wrote: > On 10.05.2023 13:12, Krzysztof Kozlowski wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > > > On 10/05/2023 10:31, Claudiu.Beznea@microchip.com wrote: > >> On 10.05.2023 10:58, Krzysztof Kozlowski wrote: > >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > >>> > >>> On 10/05/2023 09:14, Claudiu.Beznea@microchip.com wrote: > >>>> On 10.05.2023 10:06, Krzysztof Kozlowski wrote: > >>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > >>>>> > >>>>> On 10/05/2023 09:00, Claudiu.Beznea@microchip.com wrote: > >>>>>> On 09.05.2023 09:25, Krzysztof Kozlowski wrote: > >>>>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > >>>>>>> > >>>>>>> On 09/05/2023 07:27, Claudiu Beznea wrote: > >>>>>>>> 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 clocks (some of them > >>>>>>>> have 3 clocks as input, some has 2 clocks as inputs and some with 2 > >>>>>>>> input clocks uses different clock names). > >>>>>>>> > >>>>>>> > >>>>>>> Thank you for your patch. There is something to discuss/improve. > >>>>>>> > >>>>>>>> +title: Atmel Power Management Controller (PMC) > >>>>>>>> + > >>>>>>>> +maintainers: > >>>>>>>> + - Claudiu Beznea <claudiu.beznea@microchip.com> > >>>>>>>> + > >>>>>>>> +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: > >>>>>>>> + - enum: > >>>>>>>> + - atmel,at91sam9g15-pmc > >>>>>>>> + - atmel,at91sam9g20-pmc > >>>>>>>> + - atmel,at91sam9g25-pmc > >>>>>>>> + - atmel,at91sam9g35-pmc > >>>>>>>> + - atmel,at91sam9x25-pmc > >>>>>>>> + - atmel,at91sam9x35-pmc > >>>>>>>> + - enum: > >>>>>>>> + - atmel,at91sam9260-pmc > >>>>>>>> + - atmel,at91sam9x5-pmc > >>>>>>> > >>>>>>> I missed it last time - why you have two enums? We never talked about > >>>>>>> this. It's usually wrong... are you sure this is real hardware: > >>>>>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc > >>>>>>> ? > >>>>>> > >>>>>> I have 2 enums because there are some hardware covered by: > >>>>>> "vendor-name,hardware-v1-pmc", "syscon" and some covered by: > >>>>>> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon". > >>>>> > >>>>> The enum does not say this. At all. > >>>>> > >>>>> So again, answer, do not ignore: > >>>>> is this valid setup: > >>>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc > >>>>> ? > >>>> > >>>> Not w/o syscon. This is valid: > >>> > >>> Syscon is not important here, but indeed I missed it. > >>> > >>>> > >>>> compatible = "atmel,at91sam9g20-pmc", "atmel,at91sam9260-pmc", "syscon"; > >>>> > >>>> available in arch/arm/boot/dts/at91sam9g20.dtsi +45 > >>> > >>> Nice, so my random choice was actually correct. Ok, so another: > >>> > >>> atmel,at91sam9g15-pmc, atmel,at91sam9260-pmc, syscon > >>> > >>> Is it valid hardware? > >> > >> This one, no. So, I guess, the wrong here is that there could be > >> combinations that are not for actual hardware and yet considered valid by > >> changes in this patch? > > > > I just don't understand why you have two enums. This is not a pattern > > which is allowed anywhere. It might appear but only as exception or mistake. > > I'm not at all an YAML expert and this is how I've managed to make > dt_binding_check/dtbs_check happy. Picking one item at random, do the devicetrees contain stuff like: "atmel,at91sam9g35-pmc", "atmel,at91sam9260-pmc", "syscon" //AND// "atmel,at91sam9g35-pmc", "atmel,at91sam9x5-pmc", "syscon" ? If not, why do you not break it down to something like: - items: - enum: - atmel,compatible - atmel,with - atmel,sam9260's pmc - const: atmel,at91sam9260-pmc - const: syscon - items: - enum: - atmel,compatible - atmel,with - atmel,sam9x5's pmc - const: atmel,at91sam9x5-pmc - const: syscon Cheers, Conor.
On 11.05.2023 11:58, Conor Dooley wrote: > On Thu, May 11, 2023 at 06:29:39AM +0000, Claudiu.Beznea@microchip.com wrote: >> On 10.05.2023 13:12, Krzysztof Kozlowski wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>> >>> On 10/05/2023 10:31, Claudiu.Beznea@microchip.com wrote: >>>> On 10.05.2023 10:58, Krzysztof Kozlowski wrote: >>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>>> >>>>> On 10/05/2023 09:14, Claudiu.Beznea@microchip.com wrote: >>>>>> On 10.05.2023 10:06, Krzysztof Kozlowski wrote: >>>>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>>>>> >>>>>>> On 10/05/2023 09:00, Claudiu.Beznea@microchip.com wrote: >>>>>>>> On 09.05.2023 09:25, Krzysztof Kozlowski wrote: >>>>>>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>>>>>>>> >>>>>>>>> On 09/05/2023 07:27, Claudiu Beznea wrote: >>>>>>>>>> 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 clocks (some of them >>>>>>>>>> have 3 clocks as input, some has 2 clocks as inputs and some with 2 >>>>>>>>>> input clocks uses different clock names). >>>>>>>>>> >>>>>>>>> >>>>>>>>> Thank you for your patch. There is something to discuss/improve. >>>>>>>>> >>>>>>>>>> +title: Atmel Power Management Controller (PMC) >>>>>>>>>> + >>>>>>>>>> +maintainers: >>>>>>>>>> + - Claudiu Beznea <claudiu.beznea@microchip.com> >>>>>>>>>> + >>>>>>>>>> +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: >>>>>>>>>> + - enum: >>>>>>>>>> + - atmel,at91sam9g15-pmc >>>>>>>>>> + - atmel,at91sam9g20-pmc >>>>>>>>>> + - atmel,at91sam9g25-pmc >>>>>>>>>> + - atmel,at91sam9g35-pmc >>>>>>>>>> + - atmel,at91sam9x25-pmc >>>>>>>>>> + - atmel,at91sam9x35-pmc >>>>>>>>>> + - enum: >>>>>>>>>> + - atmel,at91sam9260-pmc >>>>>>>>>> + - atmel,at91sam9x5-pmc >>>>>>>>> >>>>>>>>> I missed it last time - why you have two enums? We never talked about >>>>>>>>> this. It's usually wrong... are you sure this is real hardware: >>>>>>>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>>>>>>>> ? >>>>>>>> >>>>>>>> I have 2 enums because there are some hardware covered by: >>>>>>>> "vendor-name,hardware-v1-pmc", "syscon" and some covered by: >>>>>>>> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon". >>>>>>> >>>>>>> The enum does not say this. At all. >>>>>>> >>>>>>> So again, answer, do not ignore: >>>>>>> is this valid setup: >>>>>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc >>>>>>> ? >>>>>> >>>>>> Not w/o syscon. This is valid: >>>>> >>>>> Syscon is not important here, but indeed I missed it. >>>>> >>>>>> >>>>>> compatible = "atmel,at91sam9g20-pmc", "atmel,at91sam9260-pmc", "syscon"; >>>>>> >>>>>> available in arch/arm/boot/dts/at91sam9g20.dtsi +45 >>>>> >>>>> Nice, so my random choice was actually correct. Ok, so another: >>>>> >>>>> atmel,at91sam9g15-pmc, atmel,at91sam9260-pmc, syscon >>>>> >>>>> Is it valid hardware? >>>> >>>> This one, no. So, I guess, the wrong here is that there could be >>>> combinations that are not for actual hardware and yet considered valid by >>>> changes in this patch? >>> >>> I just don't understand why you have two enums. This is not a pattern >>> which is allowed anywhere. It might appear but only as exception or mistake. >> >> I'm not at all an YAML expert and this is how I've managed to make >> dt_binding_check/dtbs_check happy. > > Picking one item at random, do the devicetrees contain stuff like: > "atmel,at91sam9g35-pmc", "atmel,at91sam9260-pmc", "syscon" > //AND// > "atmel,at91sam9g35-pmc", "atmel,at91sam9x5-pmc", "syscon" > ? > > If not, why do you not break it down to something like: > - items: > - enum: > - atmel,compatible > - atmel,with > - atmel,sam9260's pmc > - const: atmel,at91sam9260-pmc > - const: syscon > > - items: > - enum: > - atmel,compatible > - atmel,with > - atmel,sam9x5's pmc > - const: atmel,at91sam9x5-pmc > - const: syscon > I'll check it out, thank you! > Cheers, > Conor.
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,<chip>-pmc", "syscon" or - "microchip,sam9x60-pmc" - <chip> 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..aa727dee6729 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml @@ -0,0 +1,152 @@ +# 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 <claudiu.beznea@microchip.com> + +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: + - enum: + - atmel,at91sam9g15-pmc + - atmel,at91sam9g20-pmc + - atmel,at91sam9g25-pmc + - atmel,at91sam9g35-pmc + - atmel,at91sam9x25-pmc + - atmel,at91sam9x35-pmc + - enum: + - atmel,at91sam9260-pmc + - atmel,at91sam9x5-pmc + - const: syscon + - items: + - enum: + - atmel,at91rm9200-pmc + - atmel,at91sam9260-pmc + - atmel,at91sam9g45-pmc + - atmel,at91sam9n12-pmc + - atmel,at91sam9rl-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 <dt-bindings/clock/at91.h>) + - 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h + (for core clocks) or as defined in datasheet (for system, peripheral, + gck and programmable clocks). + const: 2 + + clocks: + minItems: 2 + maxItems: 3 + + clock-names: + minItems: 2 + maxItems: 3 + + atmel,osc-bypass: + description: set when a clock signal is directly provided on XIN + type: boolean + +required: + - compatible + - reg + - interrupts + - "#clock-cells" + - clocks + - clock-names + +allOf: + - if: + properties: + compatible: + contains: + enum: + - microchip,sam9x60-pmc + - microchip,sama7g5-pmc + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: td_slck + - const: md_slck + - const: main_xtal + + - if: + properties: + compatible: + contains: + enum: + - atmel,at91rm9200-pmc + - atmel,at91sam9260-pmc + - atmel,at91sam9g20-pmc + then: + properties: + clocks: + minItems: 2 + maxItems: 2 + clock-names: + items: + - const: slow_xtal + - const: main_xtal + + - if: + properties: + compatible: + contains: + enum: + - atmel,sama5d2-pmc + - atmel,sama5d3-pmc + - atmel,sama5d4-pmc + then: + properties: + clocks: + minItems: 2 + maxItems: 2 + clock-names: + items: + - const: slow_clk + - const: main_xtal + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + 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"; + }; + +...