From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D994EC98318 for ; Sat, 26 Sep 2026 09:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1scIaSS9zFH4Q2teFmhP/HXowEbr0GTYwmCfYyvH4MM=; b=rS56pCmghE1EUW V0bz8tmrJW2iD50yf1YZKzo0q3x+jbp7B+QRcSQMraqoFx2xBy39YemcGs+v1eVb/zds+0ltimd66 ozb5boQNszbjUtGI1vEkrpg5uzmf0PZ67zE3DMmeEtdncmFsgzknNhmwF/qT7Cdb1okR8Zgp0xY3O 3UAVFCapPAzq4phLdZ1TCCyKUP0r32HUemgAKaaGizD/7aMyzMXJj8wYAwHNsSiG7Wgsab/1nqCIb WbGcUnV/Ks+yr/sANnfctuKNTRV7AKz76aGgQOKQVfc4iold8qc59F752Zm+Gcv5Fng2pvqF2ly3X PA5NbJtUUnoeimqbynvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xAOxZ-0000000FEPs-0Izp; Sat, 26 Sep 2026 09:44:45 +0000 Received: from courrier.aliel.fr ([65.21.61.41]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xAOxW-0000000FEP8-2ZBp; Sat, 26 Sep 2026 09:44:44 +0000 Message-ID: <8e23838a-da5e-499c-a8be-3e2a7a0939e7@aliel.fr> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aliel.fr; s=courrier-s1; t=1790415876; bh=mNlV9athUZVILYw+C+CAVpi7ggsaI9JdHFx+6wEkvVM=; h=Date:From:Subject:To:Cc:References:In-Reply-To; b=mrwZa9xzT1YkJ2pZFvLb8A/cm94js4G0nXfiyARNuhOOAnoumXHd5GT+BChB1+CUq IfGC0YBLSlNnMSM6LEcGBaSzpKizXVvTGbZ4qcjR108IDBpiITDGhqfUpZuzx9xBUI t1nZkILFNOeMAAHiaTpkG8hJFkKJaOROUTm3+4Jg= Date: Sat, 26 Sep 2026 11:43:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta From: linux-kernel-dev@aliel.fr Subject: Re: [PATCH v2 1/3] dt-bindings: pwm: amlogic: Add core clock for T7 To: Conor Dooley Cc: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org References: <20260925-add-t7-sys-pwm-clk-v2-0-f23a22b71a5c@aliel.fr> <20260925-add-t7-sys-pwm-clk-v2-1-f23a22b71a5c@aliel.fr> <20260925-facial-follow-032de22361c1@spud> Content-Language: en-US In-Reply-To: <20260925-facial-follow-032de22361c1@spud> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260926_024443_112359_1813B7B7 X-CRM114-Status: GOOD ( 17.13 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On 9/25/26 6:41 PM, Conor Dooley wrote: > On Fri, Sep 25, 2026 at 05:13:28PM +0200, Ronald Claveau via B4 Relay wrote: >> From: Ronald Claveau >> >> The T7, A1, C3, and S4 PWM controllers have a system clock in >> addition to the two input clocks of channels A and B. >> >> The channel clocks are acquired by index in the pwm driver, >> where the core clock is fetched by name, with optional get >> which is silent when not provided. >> >> Require clock-names and minimum 3 items for T7, where the >> PWM devices do not work without all 3 clocks. >> >> Add an example showing T7 usage with its fallback to >> amlogic,meson-s4-pwm. >> >> Signed-off-by: Ronald Claveau >> --- >> .../devicetree/bindings/pwm/pwm-amlogic.yaml | 33 ++++++++++++++++++++-- >> 1 file changed, 31 insertions(+), 2 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml >> index c337d85da40f1..59320f288552b 100644 >> --- a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml >> +++ b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml >> @@ -62,7 +62,7 @@ properties: >> >> clock-names: >> minItems: 1 >> - maxItems: 2 >> + maxItems: 3 >> >> power-domains: >> maxItems: 1 >> @@ -140,13 +140,34 @@ allOf: >> then: >> properties: >> clocks: >> + minItems: 2 >> items: >> - description: input clock of PWM channel A >> - description: input clock of PWM channel B >> - clock-names: false >> + - description: gate clock for the PWM controller >> + clock-names: >> + minItems: 2 >> + items: >> + - const: channel-a >> + - const: channel-b >> + - const: core >> required: >> - clocks >> >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: amlogic,t7-pwm > > Shouldn't this (based on your reply on the previous version) be s4? > The change above is for S4 and SOCs which fallback to S4. It allows the third clock but let the schema validation compatible with two clocks existing DTS. Here for the T7, I add requirement for the exact 3 clocks. Do you recommend to require the 3 clocks for all S4 and S4 fallback, and update the associated dtsi files ? >> + then: >> + properties: >> + clocks: >> + minItems: 3 >> + clock-names: >> + minItems: 3 >> + required: >> + - clock-names >> + >> - if: >> properties: >> compatible: >> @@ -182,3 +203,11 @@ examples: >> clocks = <&pwm_src_a>, <&pwm_src_b>; >> #pwm-cells = <3>; >> }; >> + - | >> + pwm@60000 { >> + compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm"; >> + reg = <0x60000 0x24>; >> + clocks = <&channel_a>, <&channel_b>, <&core>; >> + clock-names = "channel-a", "channel-b", "core"; >> + #pwm-cells = <3>; >> + }; >> >> -- >> 2.49.0 >> >> -- Best regards, Ronald _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic