Received: by 2002:a05:622a:1442:b0:3a5:28ea:c4b9 with SMTP id v2csp746030qtx; Thu, 17 Nov 2022 07:23:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf7/5SfaxrZmCH+KvxH/5XXK9A4JiB4xNxBcc2p5jXGn+SakYbRqjEmivKmTZUXWwopho+Hy X-Received: by 2002:a62:17ca:0:b0:572:9681:102b with SMTP id 193-20020a6217ca000000b005729681102bmr3417457pfx.27.1668698613697; Thu, 17 Nov 2022 07:23:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668698613; cv=none; d=google.com; s=arc-20160816; b=DjHTVPT45eXdBil4xfuYaP7N8V909FvHOt0AwyMCa7m0Zix1UFyEvDoqbPsKwEsfxV RblVfhaVm1c1oMAiVWDnGBO2OO4Iz3X+QpTZoaO19BKbY2T55Jbz15Jebtc0sZwLu4XR dlIaH/2sCvypkopIDQHO0ELnAdSQCYKCtvQAxwh39J1dskFM4fTTTkk5QcSUmquNCdmS fZmSG3ANfv7fzrHiUvqDFubOMF7itGmTP13pR7rLgTN/ipZyeJ9p1CZ+X31TdqxC4yS/ yunjJLjNZ3rP87wFKTu2MY+RKKDG9eirVwFbx6hXbw+S5t4PFosidNrcBg96UrjM2fN0 qS4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=V6vcCZOOf8jcUqD9cs2pOvm0c4ktWa055O7dWGfWcJ8=; b=mSnd8UNRhbqUkrt2/04gN888Ee6+SgBR2+gUGezjwGbxdZxRrR0sMDL5WboJtO0L1s fA+n7lcPgr7FB8fotxamBvcpLsImEVxVDjvj3Wp2v9ud7WxTbWDqCmNx/0cVbwXXh9N3 ny45IhOYpCMArR/fZGd623e1R6lDWimHdA6yzAQjdVnvC+HTIcoItIPzOO7tvZ6f1ij1 +f2FKgh1blwCW1p4z8SH6CuIyV8aCYi3mRmb7WYOjzzPWLzcp6AE4vMsWJULkfL1Rfzx R1OJfK+BHIWe3ITYkwPUebwwFBntfTONkXwA7CaivTqtLajNWC3qV8kFnS7qsK5Na3jU OXkw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k4-20020a63d104000000b0046fb2a57348si1213774pgg.84.2022.11.17.07.23.20; Thu, 17 Nov 2022 07:23:33 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240009AbiKQOYg (ORCPT + 92 others); Thu, 17 Nov 2022 09:24:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239809AbiKQOYe (ORCPT ); Thu, 17 Nov 2022 09:24:34 -0500 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EE7EFD02; Thu, 17 Nov 2022 06:24:34 -0800 (PST) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.94.2) (envelope-from ) id 1ovfoW-0004mp-6f; Thu, 17 Nov 2022 15:24:24 +0100 Date: Thu, 17 Nov 2022 14:23:02 +0000 From: Daniel Golle To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Sam Shih , linux-pwm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thierry Reding , Matthias Brugger Subject: Re: [PATCH 1/2] pwm: mediatek: Add support for MT7986 Message-ID: References: <20221117115624.t2kbwscxvkvffo7x@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221117115624.t2kbwscxvkvffo7x@pengutronix.de> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 Thu, Nov 17, 2022 at 12:56:24PM +0100, Uwe Kleine-K?nig wrote: > On Tue, Oct 25, 2022 at 02:35:43PM +0800, Sam Shih wrote: > > Hi Daniel: > > > > On Fri, 2022-10-21 at 16:24 +0100, Daniel Golle wrote: > > > Add support for PWM on MT7986 which has 2 PWM channels, one of them > > > is > > > typically used for a temperature controlled fan. > > > > > > Signed-off-by: Daniel Golle > > > --- > > > drivers/pwm/pwm-mediatek.c | 7 +++++++ > > > 1 file changed, 7 insertions(+) > > > > > > diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c > > > index 6901a44dc428de..2219cba033e348 100644 > > > --- a/drivers/pwm/pwm-mediatek.c > > > +++ b/drivers/pwm/pwm-mediatek.c > > > @@ -329,6 +329,12 @@ static const struct pwm_mediatek_of_data > > > mt8365_pwm_data = { > > > .has_ck_26m_sel = true, > > > }; > > > > > > +static const struct pwm_mediatek_of_data mt7986_pwm_data = { > > > + .num_pwms = 2, > > > + .pwm45_fixup = false, > > > + .has_ck_26m_sel = true, > > > > For MT7986 SoC, I think the value of "has_ck_26m_sel" should be 'false' > > The status of the discussion isn't clear to me. You didn't visibly agree > which value is right now. Will there be a v2 of this patch? Or is it > expected to be picked up as is. The patch has been tested thoroughly and works well as-is. The CK_26M_SEL register does exist on MT7986 and, at least according to the datasheet[1], is set to the wrong value (selecting 26M clock) on reset (but probably then already set to 0 to select the bus clock, e.g. by the bootloader). So in the worst case, this is a no-op. [1]: MT7986 Reference Manual, version 1.0 released 2022-05-29, page 428 available at https://wiki.banana-pi.org/Banana_Pi_BPI-R3#Documents > > From my side (i.e. not having checked the hw details just judging with > the PWM hat on) the patch is fine. > > Best regards > Uwe > > -- > Pengutronix e.K. | Uwe Kleine-K?nig | > Industrial Linux Solutions | https://www.pengutronix.de/ | /