Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2115252rdb; Mon, 20 Nov 2023 02:19:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHIyZWO+cmAdeCCKDqpVKNfo5rs+1yoAzfuIg5P0wSKCYFUZkaijG8L4aUapUowk4+bhjj9 X-Received: by 2002:a17:90b:2711:b0:280:cd5f:bf8e with SMTP id px17-20020a17090b271100b00280cd5fbf8emr6943018pjb.18.1700475578232; Mon, 20 Nov 2023 02:19:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700475578; cv=none; d=google.com; s=arc-20160816; b=cDPzzQZ6Et62OHtQ3AV6vpeCeOn8XDu90n+/AS5Fv2hqBZ+JsiXOAKNEHf3Bf1UeU6 2Y0j44YtHdt2z1ckk3HsG2oEkU6U5j71mqwyPcOqP173wsXIgzeU6qJakQmVlWDE7vgV Pb+E3UPlzM82z+RcjCKYyrEWrgnYhRLycpM6+lRsDe7YPmlcR+cokABV9dPPpxC6C58x T2TdwzgD7Z/wqdhkL73hbihaZklHAjVpF88UsD/8J2dZl42nu8HViyGmAehUAfZnN45T jPjXZ1Q+dHyDqhcLpL0+s5Nb50FBmK4RljCROq07vJiPhiBZANdARsHXVUlfuznK36r/ L+Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=m3PqdGd3hzZKCAL9p199LXfBSoxwo8nMT5FPvyOoA9c=; fh=9ZdbH/FW9C+lebOIUUjIx4jF/tBl+dHjI+LTY4dbdXs=; b=wDqt2/JGsF2dkYz0zfuppPDAVJB8nm+JrwQZx1wT0bOsaXZRGZH853BhZhPaOdS5vR zcahFeQp0aaj9+4NaPZxmwyd3NZ/B3rcu67p6w1J1QupcQXvm1KDwS94snGyeAcjWegD GBk6KO0edrZl/KRqBF8e27Cb0AxQVkXE8PA/1iMoag2Jp/qhqMHVvB+0s52ABEkdGRlu CeLN/qo2rEKOjgrxfJk71GEFwpajpDp6nIylfzuBUZRzLIQyhwxs690F0T/dA6FON6wP b150Fw8rhGrndi3qUJ7SLZK6lMVecLuoj/qF5+02Ugq76Ol4FpyxOG5L3HAGEH4US5Tv XpZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b="m1yn9h/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id t4-20020a17090340c400b001cc3e45ac2esi4697947pld.19.2023.11.20.02.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:19:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b="m1yn9h/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CC8A5805C148; Mon, 20 Nov 2023 02:19:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233075AbjKTKTS (ORCPT + 99 others); Mon, 20 Nov 2023 05:19:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232804AbjKTKTR (ORCPT ); Mon, 20 Nov 2023 05:19:17 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD2A8F2 for ; Mon, 20 Nov 2023 02:19:12 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2c878e228b4so16564401fa.1 for ; Mon, 20 Nov 2023 02:19:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1700475551; x=1701080351; darn=vger.kernel.org; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=m3PqdGd3hzZKCAL9p199LXfBSoxwo8nMT5FPvyOoA9c=; b=m1yn9h/L+TwUamT9qs55AUfrl0KssNmjtZaRHujzEsxyXnNaFQwCqWRwgKAN2M/ssj daMtsCYudJJHmliY2hlXybPPiQa1EF9ADslr9Yps+iwo/Dy2BmU5QCosLlqVaXPycqkj fzS53CiLCqjR4QngzBzDxSL5U78DwQfSnrPtDqnRC4GZ/IHvWPpRCVLtL5u/1MVQy53N ZEMiHAlN1mlccYNAZKeUH6tug9SIH11Du5dLF1fn7X6BlXDlTMeCzi2jIWuQlkckxE+W kga2kOnMkQaMcLkz7QVyOBUtz0cf30C3y3TrogOythexiTrHKxigtsiqyQziR+//SIbN y7MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700475551; x=1701080351; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=m3PqdGd3hzZKCAL9p199LXfBSoxwo8nMT5FPvyOoA9c=; b=BU1sZCjWJpWCG7ieMk3Or4uTTv/+Bx7ErSrvNAHvRimCXF7Mtb12uNeaoMuhL672f0 uzHfHVbLtqAR5uWSHUAzWqxagCY81zHP4ck0uRzV3J9XVfp0e6QIbtia+cmk5w1bk6Dq FETCJ2Um8fhOuOm6bHztJDWOmqoa7zPl1DbR/IHlReyDsmrp3HKIiqxb8d2Wlpfb5ahK tDKRRzxD84GQeENPSWmrepS49pkiYePgaLETDmQDGWNZqtgPjTtesyoD/6ixjZ3f2/Sz gcj3pFx5cLOef3fUMMER/GWcbFuVpaseLrXEo3dgftRvGssTN+nbo7Zy2Gp5nGROf07w czhA== X-Gm-Message-State: AOJu0YzSM48z7zij9R64oxdtP40ZTPC2ADljpQthWQxrSiaLhaUk/9Zq MfMoWnft4QAv2vu+oL5YyfVnag== X-Received: by 2002:a2e:a162:0:b0:2bb:b01a:9226 with SMTP id u2-20020a2ea162000000b002bbb01a9226mr4153302ljl.7.1700475550839; Mon, 20 Nov 2023 02:19:10 -0800 (PST) Received: from localhost ([2a01:e0a:3c5:5fb1:36e8:9c14:4901:7aca]) by smtp.gmail.com with ESMTPSA id j32-20020a05600c1c2000b004094c5d929asm13027434wms.10.2023.11.20.02.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:19:10 -0800 (PST) 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> User-agent: mu4e 1.10.7; emacs 29.1 From: Jerome Brunet To: neil.armstrong@linaro.org Cc: Jerome Brunet , 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 Subject: Re: [PATCH v2 2/6] dt-bindings: pwm: amlogic: add new compatible for meson8 pwm type Date: Mon, 20 Nov 2023 11:04:48 +0100 In-reply-to: <2e7a65da-5c1d-4dd4-ac69-7559a53afdf3@linaro.org> Message-ID: <1j1qckg21u.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 02:19:32 -0800 (PST) On Mon 20 Nov 2023 at 10:55, neil.armstrong@linaro.org wrote: > Hi Jerome, > > On 20/11/2023 10:18, Jerome Brunet wrote: >> On Mon 20 Nov 2023 at 09:27, Neil Armstrong >> wrote: >> >>> Hi Rob, >>> >>> On 19/11/2023 17:05, Rob Herring wrote: >>>> On Fri, 17 Nov 2023 13:59:12 +0100, Jerome Brunet wrote: >>>>> Add a new compatible for the pwm found in the meson8 to sm1 Amlogic SoCs. >>>>> >>>>> The previous clock bindings for these SoCs described the driver and not the >>>>> HW itself. The clock provided was used to set the parent of the input clock >>>>> mux among the possible parents hard-coded in the driver. >>>>> >>>>> The new bindings allows to describe the actual clock inputs of the PWM in >>>>> DT, like most bindings do, instead of relying of hard-coded data. >>>>> >>>>> The new bindings make the old one deprecated. >>>>> >>>>> There is enough experience on this HW to know that the PWM is exactly the >>>>> same all the supported SoCs. There is no need for a per-SoC compatible. >>>>> >>>>> Signed-off-by: Jerome Brunet >>>>> --- >>>>> .../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 ? >> I have specifically addressed this matter in the description, >> haven't I ? What good would it do in this case ? > > 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 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. 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 > > Neil >> >>> >>> Neil >>