From patchwork Fri Oct 21 15:24:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 6746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp760447wrr; Fri, 21 Oct 2022 08:29:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5sMnwaN1z4mJ3hKgiLpyIAEakKItkOSmgjE+OtrEEil2+srA10eTMKbePQi4bI1x+sA/wM X-Received: by 2002:a63:211a:0:b0:451:f444:3b55 with SMTP id h26-20020a63211a000000b00451f4443b55mr16125406pgh.60.1666366187354; Fri, 21 Oct 2022 08:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666366187; cv=none; d=google.com; s=arc-20160816; b=PKpfD3mgAqnAJlkM9ZHicvjCvqA/I33HkgkPSIdJh3rOnFq3bqPoM+1fFr26e7kiy1 FVAmLzv7AgGCCnXCvhU5LaYTSRlwMfdo5CYHkagjnoKO/T3yTt5BXD44fmpgscBFYFfh Q1OSjhqKNjwO+XzQ/ZAgAymkfzRcLGFO5PmP8UcTr9owWsN2hv22zu46JR8MuBcGphV1 Juqk8HZj716seTv4318N7L2898qLgO/emS4Z6COgVjTH7AoJhHNzoIbqsUQO8+9R/Mbr 02geJL8H51tkYFAu/KQ4tkxK6OfEvl4eUxl53SyhAMF1ZP8Y5pB60jI7YD8zKTGA0TST Y8Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date; bh=8ocrk29+zQhD/YXlLJWL8+BOfa0Z62qLlDumaoqPjzs=; b=xzwsA8r6EXIZsr8NAZ2XowYc6AW+KVcR490wcHE8L78yt/xy2HC+nw1iKyWlMnx50z HcJbW1G2cEvoTZ9TPF+haCgcoq2H8Vq0JiVjyWlo9CYKwWb5YfWKA3gjbHVecUeM5UVw HYZizvyNpTtZsByRmNIz6+LNHPuZti6gtvNBSpKgRSt/yQd3JrtIAdrb7up2iReCBKGw zCOZFafGfnpeyLl072zJFc/xT2+9lGoSydDVtu/ayn9EXKM5jImkHb8xkEbMu0wEzi5m OqdpUo5rrhqC9xcCSn3dyOrTuer51ZyUrRuaRZwhD7a7Dy4C7LJPpTig4/9TP4D6F7M4 fsFA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k16-20020a170902c41000b00175449cf6f8si31396991plk.606.2022.10.21.08.29.33; Fri, 21 Oct 2022 08:29:47 -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; 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 S229882AbiJUPZO (ORCPT + 99 others); Fri, 21 Oct 2022 11:25:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230038AbiJUPZM (ORCPT ); Fri, 21 Oct 2022 11:25:12 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03DC21057D4; Fri, 21 Oct 2022 08:25:09 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.94.2) (envelope-from ) id 1olttR-0001TH-Ko; Fri, 21 Oct 2022 17:25:05 +0200 Date: Fri, 21 Oct 2022 16:24:58 +0100 From: Daniel Golle To: linux-pwm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thierry Reding , Uwe =?iso-8859-1?q?Kleine-K=F6ni?= =?iso-8859-1?q?g?= , Matthias Brugger Cc: Frank Wunderlich Subject: [PATCH 1/2] pwm: mediatek: Add support for MT7986 Message-ID: MIME-Version: 1.0 Content-Disposition: inline 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747311591122133847?= X-GMAIL-MSGID: =?utf-8?q?1747311591122133847?= 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 Reviewed-by: Sam Shih --- 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, +}; + static const struct pwm_mediatek_of_data mt8516_pwm_data = { .num_pwms = 5, .pwm45_fixup = false, @@ -342,6 +348,7 @@ static const struct of_device_id pwm_mediatek_of_match[] = { { .compatible = "mediatek,mt7623-pwm", .data = &mt7623_pwm_data }, { .compatible = "mediatek,mt7628-pwm", .data = &mt7628_pwm_data }, { .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data }, + { .compatible = "mediatek,mt7986-pwm", .data = &mt7986_pwm_data }, { .compatible = "mediatek,mt8183-pwm", .data = &mt8183_pwm_data }, { .compatible = "mediatek,mt8365-pwm", .data = &mt8365_pwm_data }, { .compatible = "mediatek,mt8516-pwm", .data = &mt8516_pwm_data },