From patchwork Mon Oct 19 14:07:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11844421 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B58F11580 for ; Mon, 19 Oct 2020 14:07:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6DA2A22263 for ; Mon, 19 Oct 2020 14:07:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZipQpBII"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="Ixfn+4ug" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6DA2A22263 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dtzZBBQ1x6JwiFjEqEjuT+owKi3S6m6fjuEvfDOdhn4=; b=ZipQpBIIwB9iIOrEaLo5aJlIM p7BSqvzD4fDPMGgUx/NWiIsmP6K98TZcb6QjQTDnTCJNeBdug9KgP6YN3j7o9dHcrusVDaoDoDjDh FMAIjcbtGr1qof+cP/ovMi0v2/Ow4E+sBhuJVZ71LRG1KzDLssLqcer2+u2KFuSEk2WpGlMnoTT6Z RK1ZZqC30wJSrqaVXHuCQ6moDGnhKPtpkLlSK9hSRlXy0FxAR3kaXIzvZaOlaDSIy82/7EC5zmQFS DyyOmP3GSdSa0cVt2aEcokYz9+USutT7VryUcztVEIHiOiZ/DaW2a/QTKFT6k0gownEUuz6r3pO2n XTr9LaG5w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpC-0004SO-EF; Mon, 19 Oct 2020 14:07:46 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVoe-0004Cm-Pl for linux-mediatek@lists.infradead.org; Mon, 19 Oct 2020 14:07:14 +0000 Received: by mail-wr1-x443.google.com with SMTP id e17so11583305wru.12 for ; Mon, 19 Oct 2020 07:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uWLN3YIMsxR1iGy7rW1d21liH/vLTaxscqX6iA3EebA=; b=Ixfn+4ugrcnS0mcW3BpGq5osRpI/rGY/CpMOsUqua/hbUa+kFr/ArHc10T2Dxc99gw m9g/xwwtm8YQsVgMYeGuFEMDGXwN17ZEDGoWyeaPfZzQHcMrJF0z6smN9CjY0BC6h3kB gyKQesVJMikHoAQiI+3NW1VsGkrKqQHi/NcEec7KYt+Mqgf9AyQXzlYvCeXOEJeYkeSn slON715WIhocdH5j8IPKbVCYrfsglhtXQX8TwBxEY1iB10d/Wzi2TJY8yranDGWHLlqS xRUNyjec1IBAB8zs3SaT9ttqc3YJhecUHYOjNDIc2m8PZODMC9+8yHId0iTorspZQFLZ bjGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uWLN3YIMsxR1iGy7rW1d21liH/vLTaxscqX6iA3EebA=; b=YffxYzAABGBK8skLTz05noLeUA8jktF60+5NEOxuI6omYSl7YaAjQ6udCjDiyRSR76 lLF/rNnQFsOVdPKiSlXe1IttiEYw5Xhf+/TiTUUNZ2//lQM5R5ECuFmIY6HPsGlwh+7m RU6UUS5yEdEyNO560j1CvXjGoyU0AYCDE+NV7elNB3kuuW93uzPqs4I8tmcdtPbZMF0/ ok2sQNuQ+J5xkzTjUQ/Kucl3q7141P6jgHkEBmX65Gp25nPypShdcgFxFGBLzhuQpm6D PvlBd5fOk0lNtWrtvjjtB8fhQ63E9Hz8A8oGYj0m5Xdw5pTUUjM78MD19TJhmfbvZrLP JKpg== X-Gm-Message-State: AOAM5308piloe3B4kARmop+VWh1rnQ6nY+smElYLWMt4KLgSkdGuDtlQ 5C5cWRrXAVxAwePLY5DQ0xORaCcU/m3bzQ== X-Google-Smtp-Source: ABdhPJwUZdiAJQZSzWLvRRrWeMnEjALHfBudLnha4o6MOrkzvyGZ8EKUQGdLBDYORfWVRnYqKGuLsA== X-Received: by 2002:a5d:4fcc:: with SMTP id h12mr20998755wrw.132.1603116431423; Mon, 19 Oct 2020 07:07:11 -0700 (PDT) Received: from localhost.localdomain (26.167.185.81.rev.sfr.net. [81.185.167.26]) by smtp.gmail.com with ESMTPSA id a3sm114182wmb.46.2020.10.19.07.07.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 07:07:10 -0700 (PDT) From: Fabien Parent To: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org Subject: [PATCH 1/5] dt-bindings: pwm: pwm-mediatek: Add documentation for MT8183 SoC Date: Mon, 19 Oct 2020 16:07:01 +0200 Message-Id: <20201019140705.1518822-2-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201019140705.1518822-1-fparent@baylibre.com> References: <20201019140705.1518822-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_100712_922186_0B6816A6 X-CRM114-Status: GOOD ( 12.22 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:443 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh+dt@kernel.org, Fabien Parent , thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, matthias.bgg@gmail.com, lee.jones@linaro.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Add binding documentation for the MT8183 SoC. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Acked-by: Rob Herring --- 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 29adff59c479..25ed214473d7 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt @@ -7,6 +7,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,mt8183-pwm": found on mt8183 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 From patchwork Mon Oct 19 14:07:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11844423 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4490E15E6 for ; Mon, 19 Oct 2020 14:08:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03014222B8 for ; Mon, 19 Oct 2020 14:08:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SjHhysRQ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="xE13WF5n" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03014222B8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Maq/z4CtStnxiSfv10Ll6tNuGnEm6KDZj7KcbNdEOrA=; b=SjHhysRQ6KCENXNTWAED6BDHz XdyVCBSVTYC+vduTQiRq3kWm4qM1wI6YrBMGFvOvdbJSJJIpv+qjYgv4WbIc2MLJBBgHGkWOZ04dH Z6fA9Bj6OPfQVVSE5Z1Durbs1Hre72ooJZP6cZMIDagjU5TkKF85jMRy/MgZXveeVPmj39HRYq7zU WaG2W1Yyxr2UT+zvxaeM9qtoTt7kXInvKwv6msEpjqhDBbB1lmXs1UcV8r7Bc0wcXjuahQcGrZpYq vknRCmxdm2HzWCkGY+hv13K72K/uEAtKWQoAcNXFXPh/0wV8i691UYDQwF6sh86kc8YpnLRC+0BOy LXtefqzJg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpQ-0004ZA-Se; Mon, 19 Oct 2020 14:08:00 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVog-0004E4-LA for linux-mediatek@lists.infradead.org; Mon, 19 Oct 2020 14:07:16 +0000 Received: by mail-wm1-x343.google.com with SMTP id p15so10424977wmi.4 for ; Mon, 19 Oct 2020 07:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GwShl5vcYJ2ELCoQvFguH/TiK9AVeY/s6bTP5Pdb/OE=; b=xE13WF5n40AD/I5qncMg6iY9giph35ZwITQx1RbGSZ7ei7V+dzM5985Xk94WGDDmyn 4dTmrco5XqsO9fKT34k6MoNQi3g1P6HF2ZBlYcWBmJf0/8z/W3nWU93W6lcKx1Q7/G5K TpDkI9l9YBI7/LckXf9o3hrpvuCF8wuT0TW4A4zdjXuqKvUf20UKckAskX1HD2oeuSaC 7p7TDb5aa+nGsXGcedRHzw9pOum/Jw1Hu7NRmO3vKFyCJCDoXNXecMR1kXiOGw9OL4h2 s0RR0u5D8Fktl6hlYNOBV/Ha6AjkYWFHpMFpwfyq2aSfcwTeA7kXD17oXV1q8bG4AtV4 S2KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GwShl5vcYJ2ELCoQvFguH/TiK9AVeY/s6bTP5Pdb/OE=; b=nUiTXjNC12qKN5Ju8vi8RRSp8i+Brwmx+pY/TG7APaMDBjKoziV0FhXd/SuDQ4l5ZT I2SVfFBdw/ih/kfDrG+jbs6RTYNV3sDtN7PFmG2abpa0dl0ueLsmf4UXMh4iibDvLUvv GqaBvNUE0oUPJBgRgi7q0B83WDG/lS1UqXbwNTWyh7rvKkAkRJ/r/hGPfqNTV7gjzPst CTCNym+54vEMMhnR/VOH5rn6wq64GirDC7exNx1CrSG0vgaGZiOtCENhKZEInpxI5EBM lPNKd9cL8lToaUYvAoKtjSUCzb3pnmA0ilkiUXc0sbVAVZs0HYJb9aF62oCRalAG0vtn zKdw== X-Gm-Message-State: AOAM530Wc+GC/JncMCDhPUHnSUu/zM19bFskzWNQpV/lZbC7SMpyfrn7 oBijyKxFBX15UpmYzs1LpdKOy6x068a6sw== X-Google-Smtp-Source: ABdhPJxpM2Vpfq/yWVUrjZCVwJcLDDOlDB6L3VPyeuoS6mCAvlVk3i8/5xVMTBu1ryEroDcTs668ZQ== X-Received: by 2002:a1c:4e1a:: with SMTP id g26mr17880686wmh.98.1603116433088; Mon, 19 Oct 2020 07:07:13 -0700 (PDT) Received: from localhost.localdomain (26.167.185.81.rev.sfr.net. [81.185.167.26]) by smtp.gmail.com with ESMTPSA id a3sm114182wmb.46.2020.10.19.07.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 07:07:12 -0700 (PDT) From: Fabien Parent To: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org Subject: [PATCH 2/5] pwm: pwm-mediatek: always use bus clock Date: Mon, 19 Oct 2020 16:07:02 +0200 Message-Id: <20201019140705.1518822-3-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201019140705.1518822-1-fparent@baylibre.com> References: <20201019140705.1518822-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_100714_767632_37E4E7B2 X-CRM114-Status: GOOD ( 19.36 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh+dt@kernel.org, Fabien Parent , thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, matthias.bgg@gmail.com, lee.jones@linaro.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org The MediaTek PWM IP can sometimes use the 26MHz source clock to generate the PWM signal, but the driver currently assumes that we always use the PWM bus clock to generate the PWM signal. This commit modifies the PWM driver in order to force the PWM IP to always use the bus clock as source clock. I do not have the datasheet of all the MediaTek SoC, so I don't know if the register to choose the source clk is present in all the SoCs or only in subset. As a consequence I made this change optional by using a platform data paremeter to says whether this register is supported or not. On all the SoC I don't have the datasheet (MT2712, MT7622, MT7623, MT7628, MT7629) I kept the behavior to be the same as before this change. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger --- drivers/pwm/pwm-mediatek.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c index ab001ce55178..108881619aea 100644 --- a/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c @@ -30,12 +30,14 @@ #define PWM45DWIDTH_FIXUP 0x30 #define PWMTHRES 0x30 #define PWM45THRES_FIXUP 0x34 +#define PWM_CK_26M_SEL 0x210 #define PWM_CLK_DIV_MAX 7 struct pwm_mediatek_of_data { unsigned int num_pwms; bool pwm45_fixup; + bool has_ck_26m_sel; }; /** @@ -132,6 +134,10 @@ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm, if (ret < 0) return ret; + /* Make sure we use the bus clock and not the 26MHz clock */ + if (pc->soc->has_ck_26m_sel) + writel(0, pc->regs + PWM_CK_26M_SEL); + /* Using resolution in picosecond gets accuracy higher */ resolution = (u64)NSEC_PER_SEC * 1000; do_div(resolution, clk_get_rate(pc->clk_pwms[pwm->hwpwm])); @@ -281,31 +287,37 @@ static int pwm_mediatek_remove(struct platform_device *pdev) static const struct pwm_mediatek_of_data mt2712_pwm_data = { .num_pwms = 8, .pwm45_fixup = false, + .has_ck_26m_sel = false, }; static const struct pwm_mediatek_of_data mt7622_pwm_data = { .num_pwms = 6, .pwm45_fixup = false, + .has_ck_26m_sel = false, }; static const struct pwm_mediatek_of_data mt7623_pwm_data = { .num_pwms = 5, .pwm45_fixup = true, + .has_ck_26m_sel = false, }; static const struct pwm_mediatek_of_data mt7628_pwm_data = { .num_pwms = 4, .pwm45_fixup = true, + .has_ck_26m_sel = false, }; static const struct pwm_mediatek_of_data mt7629_pwm_data = { .num_pwms = 1, .pwm45_fixup = false, + .has_ck_26m_sel = false, }; static const struct pwm_mediatek_of_data mt8516_pwm_data = { .num_pwms = 5, .pwm45_fixup = false, + .has_ck_26m_sel = true, }; static const struct of_device_id pwm_mediatek_of_match[] = { From patchwork Mon Oct 19 14:07:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11844425 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 160A41580 for ; Mon, 19 Oct 2020 14:08:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE43F22263 for ; Mon, 19 Oct 2020 14:08:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="k/xUluwv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="My2XOU4M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE43F22263 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xCE9UYJq04VQfC3BtKsx9l4iqgWMEPOxA/mxs1sqqyE=; b=k/xUluwv2xrRxJqVTidmpj52a jHUCEsYRVSgM1D5S3O0B3xzYuhD9t4yuwve6uxaWNJnY59uxVyshlNnCUE9Fsg8ObZTXKOwSu3zty u+4E7ddTMjbdjfE1DzacJVyjn64NVtAiZ9XSRRbdPGlN17jyRGqkKtchUdIzdYM/WHnUB3tA7bDqR GHDwu+bbUQkI3Onuqi/w3+V/wMvH4PDbSXWlI9EJSrrHEaiHHZUFfiQq+D1wZaIjMI3m3A181p2js DpqnWY53dlzClcZxNPtc1Demy9yosa1RYuhfcC6FLGWalMm+gR2V/n7F/rKix2eYBc0hjtbFkdi+f NOx1Z6qxA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpX-0004d8-Is; Mon, 19 Oct 2020 14:08:07 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVoi-0004FY-P7 for linux-mediatek@lists.infradead.org; Mon, 19 Oct 2020 14:07:20 +0000 Received: by mail-wm1-x342.google.com with SMTP id k18so13021830wmj.5 for ; Mon, 19 Oct 2020 07:07:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D3Li+sQUwDiy01vgvmIIRdUEc3y1uDj2ZfggKxaTpm0=; b=My2XOU4Mc8Cjt3OIle3OjrmpttFQr8rNVInWtvQtF+8kSYnHcmu2f2TFy0T7sTUTzJ r5Q/sMW0rTXS2e9tnAQbRnMZAFFvAutWsJuGbZcljXuF94Pq6s4NmiLXygDZvVfraUYT FXtY8tj/QWjkupNCk1YGt8AzHU6Do+owEM5yC+ywMTb45HOziqqGDd5vDuVJlT2RIqLj GvWGx+tWNSz8801aG5t7p6mHKDO6sjrknJzEjg27MCQ6aWlhSUzn9TNNB2NWiiqLjmdf y0UjJbLvZYAWGUHdXzzOnaB/CHmOZTbi2XiZ4KwD2ZMpTxVwIV1AaOlKxDm4qF2DT35A ZktQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D3Li+sQUwDiy01vgvmIIRdUEc3y1uDj2ZfggKxaTpm0=; b=OTQLmafK6xOIZ4z8VYXnjJSaDGK3ufxJLwwkEE7dDWIf044SIcToDMu/gDWgkk7wxG xwmwYnNk+19lOz9CVAAm2Dz0GDIm7nzMK7ju71pDzKjfJJMxUnsJp/Ie1xLNBfMJzr98 mw8D0jnozmjdR9QSaob9pDYddI5+K6C4No7R4UDBeS9SxpNpBJbvU3XfNH9Y4zlltJSb gEFJLTJfz0Tk0KhMFp3zc8CFfGUsP0udMFSBSkeI4LYwUTI6lHWuB4RZ5kJOm0+WQd5v WOIWqqTfd1lACrq5f3FCaPY+Qp7J7bungq7PIWDuyafN899hZTN8ZXpZhGfTLsxyI5d/ w+Hg== X-Gm-Message-State: AOAM533OCFDLrf/xSbzrX09wJ43R9qj4Fu0zJgoG5Nln+TBOH9iHzQVJ b2tQhOne5zJ3r9a81MMlfTYXKCA2Xsp3gQ== X-Google-Smtp-Source: ABdhPJxTtRwa45FbRqYGWLXbhD/Wmp3nnFk48uFyq7/Acm7NbdVSp0yBk/ZY5MwmW5FwS/KYQkZoBw== X-Received: by 2002:a7b:c242:: with SMTP id b2mr3032645wmj.25.1603116434905; Mon, 19 Oct 2020 07:07:14 -0700 (PDT) Received: from localhost.localdomain (26.167.185.81.rev.sfr.net. [81.185.167.26]) by smtp.gmail.com with ESMTPSA id a3sm114182wmb.46.2020.10.19.07.07.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 07:07:14 -0700 (PDT) From: Fabien Parent To: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org Subject: [PATCH 3/5] pwm: pwm-mediatek: Add MT8183 SoC support Date: Mon, 19 Oct 2020 16:07:03 +0200 Message-Id: <20201019140705.1518822-4-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201019140705.1518822-1-fparent@baylibre.com> References: <20201019140705.1518822-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_100717_760761_1A237E43 X-CRM114-Status: GOOD ( 12.46 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:342 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh+dt@kernel.org, Fabien Parent , thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, matthias.bgg@gmail.com, lee.jones@linaro.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Add PWM support for the MT8183 SoC Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger --- 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 108881619aea..9052b500b8f0 100644 --- a/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c @@ -314,6 +314,12 @@ static const struct pwm_mediatek_of_data mt7629_pwm_data = { .has_ck_26m_sel = false, }; +static const struct pwm_mediatek_of_data mt8183_pwm_data = { + .num_pwms = 4, + .pwm45_fixup = false, + .has_ck_26m_sel = true, +}; + static const struct pwm_mediatek_of_data mt8516_pwm_data = { .num_pwms = 5, .pwm45_fixup = false, @@ -326,6 +332,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,mt8183-pwm", .data = &mt8183_pwm_data }, { .compatible = "mediatek,mt8516-pwm", .data = &mt8516_pwm_data }, { }, }; From patchwork Mon Oct 19 14:07:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11844427 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6BA9315E6 for ; Mon, 19 Oct 2020 14:08:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0EB80222D9 for ; Mon, 19 Oct 2020 14:08:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UzvM6USj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="0lEqMP1O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0EB80222D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IHWty2Joe/QUInmSod55xQ/pAdpJ/YsrCsnqTXfFrJ4=; b=UzvM6USj+w189vWGn6sv0p2l2 obDiDmcSySROB6SYZo0DXBqEm0AWP0LCqyOEY8neAAowypdXF8RHXqWUZ9Lx3S/9vINP020clEFxA bgAg6LM8AKqiGd9yOweOIAXCJK0e1fJivEy4k0YbwQhBpBiyhcpU9dMF3xyyumk3gE0YS77j5htiy Sh+rBUI9ogxo4lL9iwB39EwUGex6cwlPxGashsV99n3NGS0dnUJdG0dXiNVnrk1W9cnswyske7+DP 9P9rLN7/yzuNV/dr1lavS/I9GT678ix57UNcDABfsYes/nLXy4/PO4u+obUvMODDJCqT3EVL8yUKV smlAcQnTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpf-0004hS-Am; Mon, 19 Oct 2020 14:08:15 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVok-0004G0-Lo for linux-mediatek@lists.infradead.org; Mon, 19 Oct 2020 14:07:23 +0000 Received: by mail-wm1-x343.google.com with SMTP id d81so10457993wmc.1 for ; Mon, 19 Oct 2020 07:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/BDpR1YjUQuY5B8x3jMFdrl3UVJs1R891gJ2IPtuaQ0=; b=0lEqMP1OyKzxt7fV7571VcjYQLxRQ2VNoXPJESQG7F42ZYRvzihHztjGqNMIQ+eYI/ jH7adWvQ9zLvDy+UAT0b9PwZQceZ+VgC/fEDuiKTKKzFj7lhZP7rCJA2eE1yP3ZZEqfk sy2APczlrHlQLe+BovWVdn+dkeC5/RiHaySlG0gvCdDLfnnHYSPuIHd2YETKXxoxvbCH Q93gK4uPgY00NcAW0ByjB2+W+y9mxNf2WpwDTHZyrifDi/chi9vWsvNvr6hLxW8CZdTX f0gVHbsdSn5SoBil1b0Z1/RYlLu0LpwyzMS6KDDfCCTZX8/d4yx24Uj0tDB69iOf+EWu ka+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/BDpR1YjUQuY5B8x3jMFdrl3UVJs1R891gJ2IPtuaQ0=; b=kOGm7UdgQM+mUQXmXaXsk/ZQGDrubk4GA5uWeoXoyZlyOekbH9khWcdOLVcnuSev+W NLMGLlcRVEPymztT8mtfXA9rmYCL7B/sBkXUQlN0a7lywnDDHB5Zoqs9EQxkblVRtGKj LEdR5+w1vfD7y9E48K+vynkC5fvzfPDJ2PrMJ+w43Hsk0e2/g964echlvkArIRjMe8PY hp0w7VUFkbpX3Q7TVbfzzs2okjSo6CEcg22pDN2LWqgwIG9gLb4wXTo5W+gPU7psAHKp 5MGaQeGDI7R8dF6y4wHdPXllgqXF9fOJOxsv/NGBsfhwHrcKTB9CI8ILuYqMsMTjbSgw YwVg== X-Gm-Message-State: AOAM533z3GCw3aJuc19pI/vd+9W8otrh2ulhJkUWEAemabYdkJ9vuI3C zxyBSIVcPUvy5jACTvVKa4LsGqt9TmF4zg== X-Google-Smtp-Source: ABdhPJyOozw+yL0LyWF9Z/iMPXXfzuXa/dhpJm3XAGEMIK3TXLDZAceOfnhXl9WQi/FFmA+HB0P8Mw== X-Received: by 2002:a7b:c4c3:: with SMTP id g3mr10922769wmk.127.1603116436493; Mon, 19 Oct 2020 07:07:16 -0700 (PDT) Received: from localhost.localdomain (26.167.185.81.rev.sfr.net. [81.185.167.26]) by smtp.gmail.com with ESMTPSA id a3sm114182wmb.46.2020.10.19.07.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 07:07:15 -0700 (PDT) From: Fabien Parent To: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org Subject: [PATCH 4/5] arm64: dts: mediatek: mt8183: add pwm node Date: Mon, 19 Oct 2020 16:07:04 +0200 Message-Id: <20201019140705.1518822-5-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201019140705.1518822-1-fparent@baylibre.com> References: <20201019140705.1518822-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_100719_232774_68377389 X-CRM114-Status: GOOD ( 11.28 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh+dt@kernel.org, Fabien Parent , thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, matthias.bgg@gmail.com, lee.jones@linaro.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org MT8183 SoC has 4 PWMs. Add the pwm node in order to support them. Signed-off-by: Fabien Parent --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 9a3cf95676e1..290d15dd9490 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -709,6 +709,20 @@ mmc1: mmc@11240000 { status = "disabled"; }; + pwm0: pwm@11006000 { + compatible = "mediatek,mt8183-pwm"; + reg = <0 0x11006000 0 0x1000>; + #pwm-cells = <2>; + clocks = <&infracfg CLK_INFRA_PWM>, + <&infracfg CLK_INFRA_PWM_HCLK>, + <&infracfg CLK_INFRA_PWM1>, + <&infracfg CLK_INFRA_PWM2>, + <&infracfg CLK_INFRA_PWM3>, + <&infracfg CLK_INFRA_PWM4>; + clock-names = "top", "main", "pwm1", "pwm2", "pwm3", + "pwm4"; + }; + efuse: efuse@11f10000 { compatible = "mediatek,mt8183-efuse", "mediatek,efuse"; From patchwork Mon Oct 19 14:07:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11844429 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B30721580 for ; Mon, 19 Oct 2020 14:08:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6AEE522263 for ; Mon, 19 Oct 2020 14:08:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1oNAEIzf"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="jXznkorp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6AEE522263 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YgbzEQmJ7NXFGYPCHtHQ65psIRG7YmIxaGJGBDnmOgk=; b=1oNAEIzfQydFcGK9HSDEpUsT5 EDikZzeXQHI79V22CWAIdIxhEoxs/JABQ91M8K4trdQx9Yq2MmQCOWEeFRjiTJ8w5/RsHL4lO3hf0 zzvh61wX70+6Si7noVoLby+EiccT10NQ0KsmwTkhc3+7lUypwZlO14QnrfH5PgDam9tUpv0SV+Xi6 tqW+EsPaib9vqkqCUB86m9ddPNzz2ho9pEG6Bj9YA9ZAMZ3wy+Nl899RbHwxVeWFMkPGkW9RoB6YP mGEqaXCarZSbHHiFc2zojaonWJw0d/LxG9eqFpVG6CSvWok6r72h8+sxC6s7GD6BWj8Z8qjg0S7vx evkPS7S4A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpn-0004ne-73; Mon, 19 Oct 2020 14:08:23 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVon-0004I5-8B for linux-mediatek@lists.infradead.org; Mon, 19 Oct 2020 14:07:31 +0000 Received: by mail-wr1-x443.google.com with SMTP id g12so11595548wrp.10 for ; Mon, 19 Oct 2020 07:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PndEcJoIhu8Ps+w0iBL39IDLYKub+UL8r52UvlKnJPk=; b=jXznkorpMbudtjKvBK4N2QF2KUBXyVi6JOt43LjMCWyqO0eI+NX5Ra79Mw6fO6R4hV VQQao6w/fLm0ghZUYIZk5zVG7sGfX/Q5W/6c4jiY04AJ4mZZ7BC7Gybz9AACJs178wF/ NRCf2NNy/LKrKLIZkF8QxD+aJngGEvFGnsJIYdiMAy+FQqdaB3suFwIKI3pTM/2S2Rhg QV8yxYmPM5QglOe4SR1YeNEdTW8UzDkYonThnq725J+DuvVxhby2SgS1U+sZ8zUvLnAB 6TGjK+mYNHJWehouP+Lha3mwUxtpTWDrhz1tesldO1lxVOiMxWVcRHu9kSbla0L23zyD JXwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PndEcJoIhu8Ps+w0iBL39IDLYKub+UL8r52UvlKnJPk=; b=Z+I5eoT8Gw2hwBaMNK08mOSAxEU1ukoS8USs7xwqXgKk8P1E87VwSP3d3bYL1n1wZV 3LhzliYA5o+CcmduSqzM6IN59juw6n9vopYzzNe3Yr34RQh579Zpj2wEhkd5So/sLtg7 PK51auDsj3pmYvlyYoAwnfT6J7QGW+z9A+uWMPH6sXmat6yIH41SE6CPzZtCjKQ+X+pu AnuxPkBCq8/0yFKfdE4i8BlHNJxH2cOAcINGT7fVK1I2nSzxYICeNXry2fZWPtJEfUHb RBD5UXvPyqdgAr+DY7Nnlf0/fbGra+ZblQbI7ZtX+TIbZ5/hJUM4rTP7YEr+52H4oQoj DLoA== X-Gm-Message-State: AOAM532wF24W91/kPT8ffl0ZoQwrx0nPBXT18mOWC4ys0SyeNQbv2Xt2 wsF31vChpDUbuDQnZ0lvlafHGEA3YSEoDg== X-Google-Smtp-Source: ABdhPJxbu5w5soYFv2Gj3kP13jgoxuRXjNkYcBYnVYdc/YxGK5tt2wig/DTZ0pvnP2bONQqInoEfww== X-Received: by 2002:adf:ed8f:: with SMTP id c15mr19230884wro.136.1603116438263; Mon, 19 Oct 2020 07:07:18 -0700 (PDT) Received: from localhost.localdomain (26.167.185.81.rev.sfr.net. [81.185.167.26]) by smtp.gmail.com with ESMTPSA id a3sm114182wmb.46.2020.10.19.07.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 07:07:17 -0700 (PDT) From: Fabien Parent To: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org Subject: [PATCH 5/5] arm64: dts: mediatek: mt8183-evb: add PWM support Date: Mon, 19 Oct 2020 16:07:05 +0200 Message-Id: <20201019140705.1518822-6-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201019140705.1518822-1-fparent@baylibre.com> References: <20201019140705.1518822-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_100721_619531_12E184B3 X-CRM114-Status: GOOD ( 12.18 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:443 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh+dt@kernel.org, Fabien Parent , thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, matthias.bgg@gmail.com, lee.jones@linaro.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Enable the pwm driver and set the pinctrl for PWM A line. Signed-off-by: Fabien Parent --- arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts index ae405bd8f06b..c8e1d97e564f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts @@ -333,6 +333,12 @@ pins_spi{ bias-disable; }; }; + + pwm0_pin_default: pwm0 { + pwm { + pinmux = ; + }; + }; }; &spi0 { @@ -381,3 +387,9 @@ &spi5 { &uart0 { status = "okay"; }; + +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_pin_default>; + pinctrl-names = "default"; +};