From patchwork Mon May 30 20:50:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864954 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 BD829C433FE for ; Mon, 30 May 2022 20:51:55 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vXMgqe3GS4KLTyM/oAKWUnI/yKggkFKA9HMx48xBDHM=; b=yhBB6+hTGEV1um Cua3KbWkA8QeoVsnZzs4cHqITcMgt3bNMuEo+ZCMeu4p84MDtCfVtVgMDOXHbK/FM9Zm9jriqZvyk eofEZWwVgF1MtFwGNg3CfXNcnMZsElYGGbp6o+TjPLlu23iqNvH0+KNGqCfR92uiBVyEWOUyhxV6q iAfsiOQTqjby6SQymi+QW9dDCXNV7r+muNA93zWF1nbYVTCqqU+wmSLy/ENwPcXJHg5x6fw05pWJB 6+urO0Tc6G5i9xGiQ7kjp52qBsmKHbl5anbYHCGXvwOk1V3DG5QFmp/LyRf+ilodEWw1PAixBntuu BFkltPta+Km9/IB6o/2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvmLh-008H6P-0A; Mon, 30 May 2022 20:50:49 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvmLc-008H43-BA for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:50:46 +0000 Received: by mail-wr1-x434.google.com with SMTP id k16so11758629wrg.7 for ; Mon, 30 May 2022 13:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1lLChvyS/A963A4FUBu+MX1MVuqX0L31WAxbAXk0Rco=; b=TbWWfG3mwDAj3SlGK80UuCpJ+MU0f/6ckruWH7QPFPzJCTSVxTMObr+5jdPopbqJlc m+Xe8iKMzLEPVeY40Ofg+nC0bMhyd3DI/UcEaV6u+W4DH1149GT2GUCTM5XiLrc5eDuZ K3MODHqwWUmOH3IsgR2EzmAOPbAdDybF0HU+yL2d66R2Kzf8+KVLa2DYp6t8hiOZsyhI oLc+YnVjoPtrWKRwVbTl456dj/Z/n0ZK80hy9nFJ1Ra2pkvzPxQAMZjee3tbPUWVwq+w jWymAdqKP8tTerCgrRRNkWONCAkck0LqyJ+Qy7Xrj6E2jfyUteHh0EVy/vO+YFEk2CmB PZ1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1lLChvyS/A963A4FUBu+MX1MVuqX0L31WAxbAXk0Rco=; b=y0rKbFq/rKrhaYDqD6h3GgwfYMf2HSZhQvQ6cHwO4D3U1lHGdFdooi+etko1SnklaA 3H5clnOUtmBoC6+h/fxkfmJoQTJFxBeV9WeuAW8/loZnTAECzO20B99mqVwGi6h8Qmzn SbPKU1rF7hH91MTOstRFz8V8N2r2QF+Yh+7PXZRzcyZwilhuIcVEIHhMbxT08ViZaB9W //3F09t6XyHcNOz3yLHHENFNAYA7PJ4LatNOyQVMgY4io/RV9hHBcA6EtA+M2q2O6n/Q FawZ6scyXh7mO7Oy6QaGqqDb/6aY4+naEM5O66lLXoPEkf10LoQYAHZzri83oIgHw+Gp t/ng== X-Gm-Message-State: AOAM531dO0rfTa74ALU9lDPYOD2dRHBxaQfqmwzBzpUHxAaB4e73TpEn 9xHs9YhaPjPLiP/CeArjwuo0ew== X-Google-Smtp-Source: ABdhPJzI+EByJbFzqqyfHEexvTgYT9aG7LLERB46N3RzB/NvGbW2le+Yxe0x4SZCCWeuFEYWmA6dWQ== X-Received: by 2002:a5d:5955:0:b0:20d:4b4:9879 with SMTP id e21-20020a5d5955000000b0020d04b49879mr46283608wri.550.1653943842941; Mon, 30 May 2022 13:50:42 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id u7-20020a05600c19c700b003942a244f2bsm384976wmq.4.2022.05.30.13.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:50:42 -0700 (PDT) From: Fabien Parent To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Lee Jones , Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Fabien Parent , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 1/2] dt-bindings: pwm: add MT8365 SoC binding Date: Mon, 30 May 2022 22:50:37 +0200 Message-Id: <20220530205038.917431-1-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_135044_446904_2D94D364 X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent Acked-by: Uwe Kleine-König Acked-by: Rob Herring --- v2: fix clock description (five -> three) Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt index 25ed214473d7..ff792512399b 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt @@ -8,6 +8,7 @@ Required properties: - "mediatek,mt7628-pwm": found on mt7628 SoC. - "mediatek,mt7629-pwm": found on mt7629 SoC. - "mediatek,mt8183-pwm": found on mt8183 SoC. + - "mediatek,mt8365-pwm": found on mt8365 SoC. - "mediatek,mt8516-pwm": found on mt8516 SoC. - reg: physical base address and length of the controller's registers. - #pwm-cells: must be 2. See pwm.yaml in this directory for a description of @@ -17,6 +18,7 @@ Required properties: has no clocks - "top": the top clock generator - "main": clock used by the PWM core + - "pwm1-3": the three per PWM clocks for mt8365 - "pwm1-8": the eight per PWM clocks for mt2712 - "pwm1-6": the six per PWM clocks for mt7622 - "pwm1-5": the five per PWM clocks for mt7623 From patchwork Mon May 30 20:50:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864953 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 A58A5C433F5 for ; Mon, 30 May 2022 20:51:54 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sc5d9vajU1wtb7v+Jq2+aV+OtLf18sNendWoryNR+8E=; b=YCQ3bFy6YwTCZN FpmF9ZnD69EQzVoakHybYD5+TMSCu13L/Hu5YjUDWHj3eo3lPpZfn7P9D6Wi4alQG4fOisO2nRbSH e+gD95aaXzbJut55d8lTdO/jw3C1unoQ61Nem0f+22nSRDs67sAy0Q0wNW8ESuFINlCzvyUwWFvjk WjhE8xlFBlLPFxS8HbC7raf2ANHMxjLE/tdhg11s+YXySZDbXCYF1jA7YAyyV5ibYbDp7NiTk2ZKq j3nHSbB+QJfyQpKwccUH02gctM2R3WMC55E/KBN9QXr1WxmYTCOlfN2Sh49WwbXgHmMJCLlgAZu2g /djXAJ0YjgogGuevEqjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvmLq-008HAJ-Gm; Mon, 30 May 2022 20:50:58 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvmLe-008H4w-Hl for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:50:47 +0000 Received: by mail-wr1-x42d.google.com with SMTP id e25so5469926wra.11 for ; Mon, 30 May 2022 13:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WRLXEWGUFXz1TBqCoD7auTBGRZvFHTpsQ7F1lieIRog=; b=PPZJ904G27hm3et8x7iWcXR+2/DOL4KKyJom79Uix9p/t9dOJ4Re3i8HZCL6awOhXC K2em4pXNPg1gqWJXfNVZHXxkyzc/xyeV5juF4Q3jHi6KMvJPhVkDFiHPPbuxUH1hwyW9 R8OjDsxQY5UD8m5nQ0Naqlsjn15Sh+M0NZC2G2meVIo8k2WZmKA47nyjMK6vmd1KXqsG GLxa6GjNNCQNTz3K9bJmiEWt/20rVMKi+HoO9I2i4cr+twzpGxaI4CLnMmwBF7kchVpO qCYpPWCGQ7/neIl3xLAU3nh8SDkg3syGg3ERQVvJpcWXsWxrav9Kv73q92zEN3DuIPqQ Ee1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WRLXEWGUFXz1TBqCoD7auTBGRZvFHTpsQ7F1lieIRog=; b=FeaPQ23EFQJ2IahCl1zVHpvCfxJzbVSTnhIPwwPscFzoqtDiy8Bf+tWOhcqB6l0bg6 5JqLyqdHAPQGiM6YjfN7aBxJaCWQEb5xdpyvnX9g3MCkziI7NydOLKPqEQUb9cLP/76c TPa9e1dxocIHgoASwE3X860V9P2S/RGBh3N1k9xt0M2BnCCyb2K8ZCvKIrCDd856XL3b Uj4Mc+re9ZEgoJ7v5mWPWVU5+SJXLXMM3I1CnjcL2Xvyiy1ij2sU3g1LAj+GOWcrA39o u++57ddEmHOxmwIHJeNLdnzbrRLlbMt2Mnl1UQr7K2dyBt/qkkQtrdSN8A+4qI19BxKG UIeA== X-Gm-Message-State: AOAM533OUSIZgnBfskMaOSjVbRxNQ+dagZVkPF4m7d52QG7Hc23I6zhw v2/lIeineNHDTuamgTvfGleKOg== X-Google-Smtp-Source: ABdhPJzTyqcEeVJTkuWOm1/qdu1c4GOnlwcH/o8Q8LSshlKxF8kh7vxZ6/omdda+4o/u0HAsAvegHQ== X-Received: by 2002:adf:e691:0:b0:210:2d6a:8a82 with SMTP id r17-20020adfe691000000b002102d6a8a82mr8428567wrm.14.1653943844480; Mon, 30 May 2022 13:50:44 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id u7-20020a05600c19c700b003942a244f2bsm384976wmq.4.2022.05.30.13.50.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:50:43 -0700 (PDT) From: Fabien Parent To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Lee Jones , Matthias Brugger Cc: Fabien Parent , linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 2/2] pwm: mediatek: add MT8365 support Date: Mon, 30 May 2022 22:50:38 +0200 Message-Id: <20220530205038.917431-2-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220530205038.917431-1-fparent@baylibre.com> References: <20220530205038.917431-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_135046_689358_E4592A0A X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for PWM on MT8365 Signed-off-by: Fabien Parent Acked-by: Uwe Kleine-König --- v2: no changes 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 568b13a48717..fd586bc51c5f 100644 --- a/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c @@ -294,6 +294,12 @@ static const struct pwm_mediatek_of_data mt8183_pwm_data = { .has_ck_26m_sel = true, }; +static const struct pwm_mediatek_of_data mt8365_pwm_data = { + .num_pwms = 3, + .pwm45_fixup = false, + .has_ck_26m_sel = true, +}; + static const struct pwm_mediatek_of_data mt8516_pwm_data = { .num_pwms = 5, .pwm45_fixup = false, @@ -307,6 +313,7 @@ static const struct of_device_id pwm_mediatek_of_match[] = { { .compatible = "mediatek,mt7628-pwm", .data = &mt7628_pwm_data }, { .compatible = "mediatek,mt7629-pwm", .data = &mt7629_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 }, { }, };