Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6886165rwr; Wed, 10 May 2023 00:18:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5s/dDrB9PPpPHfOezNojjryRIz1vThAYDHQjJVpHc6W/9ABdor3BjbgZrw+WvxBi520qK6 X-Received: by 2002:a17:903:124f:b0:1aa:d292:3814 with SMTP id u15-20020a170903124f00b001aad2923814mr19006702plh.67.1683703094185; Wed, 10 May 2023 00:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683703094; cv=none; d=google.com; s=arc-20160816; b=Z3mKD3Q62a6CLvP211loFWO/6XuLX/PZJqkL3vmvVMey/zp4vELJcYYqvnwBzVHCBR px+3awaBwsX8yOqcnu52/tA4N4SYcTBEU/H/RrXBN3TBVHl0nGyNB6J93AgTdud9lnpA 4mRFs5aPJP6+XkGIXfm9Hiniw86tvZ7Jx3K0vWfl2tHWQEod0JPsTt4yEvASypvLpO4l VcvS8R++fIweeKoOw5ZeNXwX+zoAiXKXepuk/AFuKz6BhgVFI2reTn2qUfOZnkAmCvAz El+Suov223xsxFc42rhL0mp+gC8vYUm/704qYQiGyfU0RU79c7gHMkopesG5OMBSpC0g TNsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Go8yaKpqgsZlAdvQI/LQWWwqe6KsP5Oli03iE2ooAcU=; b=ewHSevr1jOFjXstrwXNTjugYT2+HLVpcbtf9NXixTJO1R8E+Jec4ylQPLUHdrKqa+i CC3+/9yCC3xm7KXHx15YreIAFurLoMK3h4Mg/8mzqQ8Nn1x1lNaCSp2dq7HWr6TKMOsT VJKkJtkjCH+QPuYttZpUAnIiuDeZdP+IpY/2Mg9GUp4SwtFrGlWc4GbTcNEcavIvb4Mr 9tIwLCw8GHMB1t/on0rH7nUb6s67gweqEihaimthWz+OT5i+smULyMpUb+kk6MH0+sYP Gc1er31ldaY0YNUy699InClcORiZK9Z5fG5xmgl3nzmtB55T5xaFIu8Bmj6kdwJZxFuS tqUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vlzvrRWQ; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y19-20020a170902ed5300b001ab16e0ef5fsi3315474plb.581.2023.05.10.00.18.00; Wed, 10 May 2023 00:18:14 -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=@linaro.org header.s=google header.b=vlzvrRWQ; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236359AbjEJHGS (ORCPT + 99 others); Wed, 10 May 2023 03:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236348AbjEJHGQ (ORCPT ); Wed, 10 May 2023 03:06:16 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C79DD8F for ; Wed, 10 May 2023 00:06:14 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-965ab8ed1fcso1238556966b.2 for ; Wed, 10 May 2023 00:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683702373; x=1686294373; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Go8yaKpqgsZlAdvQI/LQWWwqe6KsP5Oli03iE2ooAcU=; b=vlzvrRWQ/avkhjSzeR6Hwe19uLhI3iXQ2snEqmaKMwkDupRqkp71nPLM7Vaaha2Mx1 C/bQf/CKBb7bt36ofm4+mo9BAj424JRJpsIiKOREBuvonNqR6e4wa5tOT/Ey+Ierbf+p DdlmVUr4fNqUTOFaW0/e4S4qwc1EMjA4lmjkZO6HvvkDQSGlE6CpuPhbGubrpICMNPEK 6KKTZsZcISyDiYIAUNchFkXcbpDnGTissj/huEe5hS8m1TyJtmYKcgt51y86j4GzHIKz T961xMnBihtk1HFAxmmvzb0ercUEcvKE5BUf5d8g08/NI+1L8g+ArTNyr8SIDttwOMhm 1niA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683702373; x=1686294373; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Go8yaKpqgsZlAdvQI/LQWWwqe6KsP5Oli03iE2ooAcU=; b=CkWOkVfRaO1KOnt+xWPlFcskzerN03ydCVV3nHrhB4c/nNYZerTFfTQ63kZ8IIlbKY H9FQc1dAos6L8sQWdWtXWfOY9ANH51opmGLSOSucVTfWYXNAtrQZlkaEz7qWTRlKKK5t dObJ37zOZnMUh+cK3mIN9x+A7tK4S/Lr+FCvEcpXR7ApDEZ2ScWyrRS5YjeqqKQyS3LL nmcSQpqS/ufRzAuv9Fm/A1I8jFGqSNG/C0Um36SkTH+nuB6fR5hrU8kY2G13GGDJfP3O m5AGUG4yFGPqXU1bJunx7xfgVULNld2CY9GwssCo2wy0pVYMllXEQbZ6i2M0rw+Y+Bbc kKrw== X-Gm-Message-State: AC+VfDxN6s6YQmKE9yHEP+og59C9zxBEOhFVQ5mxZoRnF0JweHX09Vhl UICS1Typ1JHs+34NF8tGUcq/V8OaTAnBwGGZTo4= X-Received: by 2002:a17:907:1c9d:b0:966:3310:50ae with SMTP id nb29-20020a1709071c9d00b00966331050aemr10908657ejc.47.1683702373235; Wed, 10 May 2023 00:06:13 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:c175:a0f9:6928:8c9d? ([2a02:810d:15c0:828:c175:a0f9:6928:8c9d]) by smtp.gmail.com with ESMTPSA id ig2-20020a1709072e0200b00965f31ff894sm2287926ejc.137.2023.05.10.00.06.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 May 2023 00:06:12 -0700 (PDT) Message-ID: Date: Wed, 10 May 2023 09:06:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v3 2/5] dt-bindings: clocks: atmel,at91rm9200-pmc: convert to yaml Content-Language: en-US To: Claudiu.Beznea@microchip.com, 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 References: <20230509052757.539274-1-claudiu.beznea@microchip.com> <20230509052757.539274-3-claudiu.beznea@microchip.com> <773d0d90-29c7-b1bd-bd16-898b435eafb6@microchip.com> From: Krzysztof Kozlowski In-Reply-To: <773d0d90-29c7-b1bd-bd16-898b435eafb6@microchip.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 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 >>> + >>> +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