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 }, From patchwork Fri Oct 21 15:25:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 6747 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp760456wrr; Fri, 21 Oct 2022 08:29:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6RRAdRfXkwl0bkvCmbXkolwEM2AqJ/d8gtEduqwdroBN8HcD2iR7S1AtClTRAjQZnIr1ql X-Received: by 2002:a17:90b:1bcb:b0:20d:75b8:ee64 with SMTP id oa11-20020a17090b1bcb00b0020d75b8ee64mr22949101pjb.162.1666366188689; Fri, 21 Oct 2022 08:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666366188; cv=none; d=google.com; s=arc-20160816; b=fCwDlYnvFaRaVm2cyfWO3NcRBF9LRb/WAp8SYMAniNeN9iYJFzeNdHAODdP+Jl/RV3 IWC6Hw9aMZnyXFSA6OO6kTPjbyP7N4u+Wu6alaaw7kX1nhVbEpCCMD9GhdpGkH7KQ07/ ufXLfLeJCJAHzkOayVOOq6KGJmyPJKXHRndRU2Tw+C2FcaETzo488lLxJJTyw71CcQSr c+FT2CmULsin/ZMo6fs9iyERMxfWRNPJ8jEX3gs44R/7A9wLynZ1fMRJJfp/RCfz+vaH Jv0n3nP1MwvEZHXEZ/a5j8ywaV/8rTKwTMdeKhGhDgRAj0JfwmYSrl7CQZEFZm2CsIui FBgg== 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=hgFFtg0cq0n7MFavbvSu6Pu7ckY4KcehLukkp2XzPJg=; b=sP/UlHc81uuYsCMe25hF4yB2VMG4rueJpi66i2UH6GsLuYoIRcUWYP+7U+tnpw24sX cdJret3bYxTRg6duVSZ4o5QTZL7IbIp5o6W4+Bnj/fjvYtCvX8No5IzeSU1zIN8bO3aC sELzECSW3k+c5W75mBi5tDQawjVQsOop+/7UNrUl7VLCB2ZXtGv8PCv8D91uQeusTaX/ G2rkTNiLfwjp/7r+hKoFndUkGc3nTKb/bHgsGQ8+JuAoqy0GHleLrxmScgshqScyHXM8 8t2yGwmFHMAKw36zYaZYC8JEjEZ6nUQYIGZ+ybiUBQtViS+m9um2FPXFskr0JTbTnv7j +Jeg== 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 o7-20020a655207000000b0044cce26fa32si23095626pgp.632.2022.10.21.08.29.36; Fri, 21 Oct 2022 08:29:48 -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 S230218AbiJUPZb (ORCPT + 99 others); Fri, 21 Oct 2022 11:25:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbiJUPZ1 (ORCPT ); Fri, 21 Oct 2022 11:25:27 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE99F111BA2; Fri, 21 Oct 2022 08:25:26 -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 1olttk-0001TX-RT; Fri, 21 Oct 2022 17:25:24 +0200 Date: Fri, 21 Oct 2022 16:25:18 +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, devicetree@vger.kernel.org, Thierry Reding , Uwe =?iso-8859-1?q?Kleine-K=F6nig?= , Matthias Brugger , Krzysztof Kozlowski Cc: Frank Wunderlich Subject: [PATCH 2/2] dt-bindings: pwm: mediatek: Add compatible string 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?1747311592929304773?= X-GMAIL-MSGID: =?utf-8?q?1747311592929304773?= Add new compatible string for MT7986 PWM. Signed-off-by: Daniel Golle --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt index 554c96b6d0c3e0..6f4e60c9e18b81 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt @@ -8,6 +8,7 @@ Required properties: - "mediatek,mt7623-pwm": found on mt7623 SoC. - "mediatek,mt7628-pwm": found on mt7628 SoC. - "mediatek,mt7629-pwm": found on mt7629 SoC. + - "mediatek,mt7986-pwm": found on mt7986 SoC. - "mediatek,mt8183-pwm": found on mt8183 SoC. - "mediatek,mt8195-pwm", "mediatek,mt8183-pwm": found on mt8195 SoC. - "mediatek,mt8365-pwm": found on mt8365 SoC.