Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1155334rdf; Wed, 22 Nov 2023 07:04:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEykGHMNTFZoD/VDK527ky0a03kFnA0wZ1npvWNWlOy1nQ1I7JbJMcpciqhb9c7IFmHBpP1 X-Received: by 2002:a05:6a20:54a1:b0:18a:f711:7bc1 with SMTP id i33-20020a056a2054a100b0018af7117bc1mr2667107pzk.60.1700665484130; Wed, 22 Nov 2023 07:04:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700665484; cv=none; d=google.com; s=arc-20160816; b=ttgu6SWeTcrCnre8VUqTR1sm6YoVCm+bHMltRhYlgDSeJBOKrgC+36MStwHSl2G+JR dRx30yyf+A9ZLNm4c1EM1spdotyJHOyk3JkB/Z4lvnoQ4C99Dcynt9UCSZCC6D5EZ/2+ AmlhxwBpBZhlK/g35ffUybtv+o8QABkdEUsB26laT/WSpCSuLM46CdGpfwwHVUxG3VM+ 48NgTCDO+H7QEAczdtBDgQ7ka5bfbRqS1Mg4aXJxJTvhF8HpzetAf+3itDMocWyxaujW ju8HFM1mw+WfdNu/R0jzfP0EiCVeHNJYHWVafFCOQHKbp6hBTw2H9XLUOCFkz6hZaHYh y93Q== 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:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=jG5F2lZxOZlezgA3HC707U0424BNKOg62ncFOsTiPuk=; fh=XwzjmFUwD4pkr4uCuNrs31+zHGlTrq91B0SM/hyz594=; b=NdB7wl0r4xBkOf1nOswgwU3BpajhgX8Q8Wkr6fIolythkflxhShD0dOxRFHY4C8Q33 tucZFLgxOVk9rOA/ohpvuY6U+0WOunvP4T2Gzll808jBHA5S2ipMKnOQ3iNuSDTUR9c3 oDdSt5HdN1ixsmFPbMOqnhSub1CcpMfXONdv8PJAzxfSnxV7aqPIRHB9VDKFpBBfnWJp 1GYofbkDjAGKEePEAHwJeQNU2FKlWsWBEItDqa94WcnI1ZCy4bqlcuv+qMM+KOlk3UQR +g440jJyCCreELmj+1Y/l8bmAmWCM+xAMkqkafs/ny2f7GWljMUZlsjb2VsVQ8jz41+n BtTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xSkQaPVM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id c7-20020a631c47000000b005bdbea1c477si12827659pgm.203.2023.11.22.07.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 07:04:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xSkQaPVM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C390781DE3A6; Wed, 22 Nov 2023 07:04:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344318AbjKVPE1 (ORCPT + 99 others); Wed, 22 Nov 2023 10:04:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344284AbjKVPE0 (ORCPT ); Wed, 22 Nov 2023 10:04:26 -0500 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B231D1B1 for ; Wed, 22 Nov 2023 07:04:21 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-332ce3fa438so568482f8f.1 for ; Wed, 22 Nov 2023 07:04:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700665460; x=1701270260; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jG5F2lZxOZlezgA3HC707U0424BNKOg62ncFOsTiPuk=; b=xSkQaPVMBTaZe/4N0r6rk+BpiK0f5bSbYQoQOcyodWJ7hghgkWXuPfagaU+jc9zmD4 Vysk2wwPFqw7C8NVHxF5yt8FxWuZxc7P58wp8iAkhYRExcg37g32hFNZEA/HvHOVdToG pdrsZGWct8Y07e/2QicUQCuxEU3fakpl1SnRL0Zx0me7YcQ6LEnxWz4yQcFyspvX3N2o LDPpDpvxJpWdpKxdy8acWNT4fzQpBiwe62zFB9nTJPGG9YZcqj/F62zyFofvgN1mkE8+ gIIN9OeFymvqzuoyJMCouf4aXpQqO5bZe5eHGo+XcoWIo+18llnj2dwMxJoCnwUBnFlo ukQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700665460; x=1701270260; h=content-transfer-encoding:in-reply-to:autocrypt: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=jG5F2lZxOZlezgA3HC707U0424BNKOg62ncFOsTiPuk=; b=GVrQtF7MeAIjiUa6HToIAoZhN+gxzCD1eP1TOa/FdaqwtiqvEMm5xno3169THWi+qL AU3Z09wuL1D+qMUfnrcAwRngo8Lm5k2JWnDB8U/CyD2sh6Mdrz8pWP7FsbXDPYtyDouC gAcANvJB8jT/jhUXM3pUwTTkt5VOqvS3EFU2C0FYURBQ3Sqe9t8M2VzKQrEE53ENI7Ct c9/mzgI8Zmm/w7FxsD4WQ5iUtdmDKdf00Z5IiUhRKSNXGZQ8NPaSViesTZiWWu9CAhOn IZbbIXxLnXzdLh9r5W6KqiTj7MhAJkYViIJzGp24PP9JgwSOhTRKmJrWywwWOkNzCTbq sXxQ== X-Gm-Message-State: AOJu0YxF8C8CfDGs60V2W/5XK4oi618VJPuyL6DdynwHNbtIs04gNEai 1AQDsv37GsAX3E0PsUsyiyjcYA== X-Received: by 2002:a05:6000:1843:b0:332:d1cc:b861 with SMTP id c3-20020a056000184300b00332d1ccb861mr2071211wri.25.1700665459932; Wed, 22 Nov 2023 07:04:19 -0800 (PST) Received: from [192.168.1.20] ([178.197.218.100]) by smtp.gmail.com with ESMTPSA id d16-20020adffbd0000000b003313902cef5sm17368513wrs.93.2023.11.22.07.04.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Nov 2023 07:04:19 -0800 (PST) Message-ID: <2bbc2031-89d7-42e9-828e-068fa06eabf4@linaro.org> Date: Wed, 22 Nov 2023 16:04:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/6] dt-bindings: pwm: amlogic: add new compatible for meson8 pwm type Content-Language: en-US To: Jerome Brunet Cc: neil.armstrong@linaro.org, Rob Herring , JunYi Zhao , devicetree@vger.kernel.org, Rob Herring , Conor Dooley , Kevin Hilman , Thierry Reding , linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-amlogic@lists.infradead.org, Krzysztof Kozlowski References: <20231117125919.1696980-1-jbrunet@baylibre.com> <20231117125919.1696980-3-jbrunet@baylibre.com> <170040994064.269288.960284011884896046.robh@kernel.org> <4608012c-059f-4d6a-914b-e85ad0c32ff0@linaro.org> <1j5y1wg3sb.fsf@starbuckisacylon.baylibre.com> <2e7a65da-5c1d-4dd4-ac69-7559a53afdf3@linaro.org> <1j1qckg21u.fsf@starbuckisacylon.baylibre.com> <94e69281-93e1-41cd-9cf5-81cbbc15572c@linaro.org> <1jwmu9et6j.fsf@starbuckisacylon.baylibre.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+Fi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qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <1jwmu9et6j.fsf@starbuckisacylon.baylibre.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 07:04:37 -0800 (PST) On 22/11/2023 15:34, Jerome Brunet wrote: > > On Wed 22 Nov 2023 at 09:37, Krzysztof Kozlowski wrote: > >> On 20/11/2023 11:04, Jerome Brunet wrote: >>>>>>>> .../devicetree/bindings/pwm/pwm-amlogic.yaml | 36 +++++++++++++++++-- >>>>>>>> 1 file changed, 34 insertions(+), 2 deletions(-) >>>>>>>> >>>>>>> Reviewed-by: Rob Herring >>>>>>> >>>>>> >>>>>> I'm puzzled, isn't it recommended to have a per-soc compatible now ? >> >> Yes, it is. >> >>>>> I have specifically addressed this matter in the description, >>>>> haven't I ? What good would it do in this case ? >> >> There is nothing about compatible naming in commit msg. > > Krzysztof, the whole commit desciption is explanation about why a new > compatible is introduced. I don't understand this comment. > >> >>>> >>>> Yes you did but I was asked for the last year+ that all new compatible >>>> should be soc specific (while imprecise, in our care soc family should be ok), >>>> with a possible semi-generic callback with an IP version or a first soc >>>> implementing the IP. >>>> >>>>> Plus the definition of a SoC is very vague. One could argue that >>>>> the content of the list bellow are vaguely defined families. Should we >>>>> add meson8b, gxl, gxm, sm1 ? ... or even the actual SoC reference ? >>>>> This list gets huge for no reason. >>>> >>>> I think in our case soc family is reasonable since they share same silicon >>>> design. >>>> >>>>> We know all existing PWM of this type are the same. We have been using >>>>> them for years. It is not a new support we know nothing about. >>>>> >>>>>> >>>>>> I thought something like: >>>>>> - items: >>>>>> - enum: >>>>>> - amlogic,gxbb-pwm >>>>>> - amlogic,axg-pwm >>>>>> - amlogic,g12a-pwm >>>>>> - const: amlogic,pwm-v1 >>>>> I'm not sure I understand what you are suggesting here. >>>>> Adding a "amlogic,pwm-v1" for the obsolete compatible ? No amlogic DT >>>>> has that and I'm working to remove this type, so I don't get the point. >>>>> >>>>>> >>>>>> should be preferred instead of a single amlogic,meson8-pwm-v2 ? >>>>> This is named after the first SoC supporting the type. >>>>> Naming it amlogic,pwm-v2 would feel weird with the s4 coming after. >>>>> Plus the doc specifically advise against this type of names. >>>> >>>> The -v2 refers to a pure software/dt implementation versioning and not >>>> an HW version, so I'm puzzled and I requires DT maintainers advice here. >>>> >>>> Yes meson8b is the first "known" platform, even if I'm pretty sure meson6 has >> >> Yes, this should be SoC-based compatible, unless you have clear >> versioning scheme by SoC/IP block vendor. You named it not a HW version, >> which kind of answers to the "unless" case - that's not hardware version. >> > > This is specifically the point of the comment in commit description. > We know all the PWMs compatible are the same HW (version) as one found > in the meson8b. > > It is certain that adding more compatible, listing all the SoC, will be > useless. I can do it if you insist. The docs you references insist on that, so yeah, I insist as well. > >>> >>> This is not my point. I picked this name because I have to pick a >>> specific device based one. Not because it is actually the first or >>> not. I don't see a problem with meson6 being compatible with >>> meson8-pwm-v2, if that ever comes along. >> >> No, the point is not to use "v2". Use SoC compatibles. > > It is a SoC compatible. The second one. "v2" is not the soc. I assume meson8 is one specific SoC, right? Because elinux says it is a *family*: https://elinux.org/Amlogic/SoCs > > The first one, as explained in the description was describing the driver > more that the HW. > > Changing the way clock are passed from DT to the driver would be break > user of the old compatible. So a new compatible is introduced. I believe > this is recommended way to introduce incompatible binding changes. The way is not to introduce incompatible changes. Your way is also not good as it breaks other users of DTS. > > v2 here denote a new interface version, nothing to do with HW > versioning. I happy to pick something else to denote this. Sorry, then it is not a SoC-based compatible. > >> >>> >>> I think the binding here satisfy the rule that it should be specific, >>> and the intent that goes with it: >>> >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/writing-bindings.rst?h=v6.7-rc2#n42 >>> >>>> the same pwm architecture, this is why "amlogic,pwm-v1" as fallback seems more >>>> reasonable and s4 and later pwm could use the "amlogic,pwm-v2" >>>> fallback. >>> >>> That is not how understand this: >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/writing-bindings.rst?h=v6.7-rc2#n82 >>> >> >> Again, where the "v2" is defined? Where is any document explaining the >> mapping between version blocks and SoC parts? Why do you list here only >> major version? Blocks almost always have also minor (e.g. v2.0). > > Again, v2 does has nothing to do with the HW. Never wrote it was. > The HW remains the same. Don't add compatibles which are not related to HW, but represent software versioning. Software does not matter for the bindings. That's a clear NAK. Best regards, Krzysztof