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: 11844443 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C40E7C433DF for ; Mon, 19 Oct 2020 14:09:43 +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 4A3D222263 for ; Mon, 19 Oct 2020 14:09:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="h8cCuvoy"; 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 4A3D222263 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-arm-kernel-bounces+linux-arm-kernel=archiver.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=dYmYqFer+WCm0zea1E6RPCEgnrq+0pv2+J4TVjh6+TI=; b=h8cCuvoy2Jm/8Kz6zY2/wRQxQ e1hewJ29yp0FpGy8PVGOR5XXQrEt73xcW5jfCJkFiO5tQR/T7dixB5h13M9lUosW/etJvXDOFv3rM OLAMmWCmrqh8251Xj0gXsOilmmF+NyMNW0BCZI5Y9eaI/+c7Sd5CWKKUPhvdmWgqRVzuJiuzkqjf2 t90mXbSltKVRLjy7N6+DB2L991vMtyQ1F8GEgdyYsd2/2iKkwwSaaqYd6ziiSdujAgPBDuLJTzy4+ GLgVgAXPZZloTousbEcS6Iib4/74FpOPgsuHLxNAnIS/y5+y/dUXQnxfXh6oYmHtRhBNQRJg7t6zU q9hFPo+3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpJ-0004Uh-CB; Mon, 19 Oct 2020 14:07:53 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVoe-0004Ch-NS for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 14:07:14 +0000 Received: by mail-wr1-x442.google.com with SMTP id t9so11581507wrq.11 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=trnRX1TsFILlL/iFoDRh8h1RfYLMhMuEMe5/guRgraXTM6hn7MRlAGi7uT71I9ZZgT wY1BfgeTKZlYKwkpfixf/dYOhBDI2vZ7f5OyhfP/ptUMWnUUUzHf4ChsW5ST3uTqEq8B 2t/+rlBncnW1x63VqwAWXj+loQ8aCiqo0b9bObeMTQ0S4bXiQ+Ox7O0X7g8wTiIJvTvq 5RXtRzqy/ggmYGxEPeazJuZlvUsRf1uOaxufwbnipDXqDVmYjbMHk+UTlgt0d0XbnjVq D9aTBjclnPILPHZj3dW30Ybs690Wz33suxKTVdkTiB8b8N+Xg0ObOz/j906VY2UjKvgP 4Kgw== X-Gm-Message-State: AOAM530NZDEam322o5JWUI5X3toKOSMx/LlNbkMmoc7wVD498kL/QGWB 6M1Rt+zx2O+HEm38/4Pc5YZ9Sw== 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_795436_7A90AE7B X-CRM114-Status: GOOD ( 13.83 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.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: 11844447 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7ABEDC43457 for ; Mon, 19 Oct 2020 14:09:55 +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 0110822263 for ; Mon, 19 Oct 2020 14:09:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rq6FqsmS"; 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 0110822263 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-arm-kernel-bounces+linux-arm-kernel=archiver.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=2+Ljdp9I9FFgAxtcK8nCz9yX2994Vn5yoExwv1r1fFI=; b=rq6FqsmSnxqizULt37mkNh7lQ 5e7FajrKnrf7tYpOuQ/1gG5ird/nep/Tdrr5/0bbPwbIYjyUC+bOxxvI9LdEPf4T0A4EYkOOxsMUG bvgYAqO4QlwEPc+fk27AtTC+LA2n9muMhQMM5aDv97QD/pt8DJEUxid2ukaRtIkxK1Xp9Q/ES/5ue gAkFKdT/jYwv3BCgsOvaypD7akvLmdjA27f0V30Atd8Yw1sHUqlP9v286n0TjGF58doEHUT8uUe+M 8P2YvpcivD6y+PQ79a6b4yBkI7hWYQvA74rCdweWVvHHr85a3elh2G6FZpdY959mOlk6BKqSR7+9m ykvakXmCg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpO-0004Xh-Fs; Mon, 19 Oct 2020 14:07:58 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVog-0004Ds-Gj for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 14:07:15 +0000 Received: by mail-wm1-x344.google.com with SMTP id j136so13046652wmj.2 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=dRJZYuOrA4WGKadYAmAI1jtnXvmdEOLiW72H0ua6emQHGe5AmI3HCXW9pKdstmWwW5 LdHG1whf8uaBre/XugYNzsTYA01qpgjoMUFEDNf06AUS3jmeaGI8/xuGakqycguC7fny MkZBbvsKGxhXdrncUsLsU+X5W9TKdTpp2DOZ2t0YfHVQBCNWw3EZD4qKH+qtXH+xkRu9 J0fFPSKymar5vWGNCAbZDe8YB4fITlIbZot2IV5gWOxqrp3cNnCl3AZgXiv+nPZgPZKY +X6f7tCo1hOMoJf7QGlW/e3ElOwEcRTEakIO0F76NJLCjClbot/bbotT6IoR6d2A3zXx w/Bw== X-Gm-Message-State: AOAM530O5jVNNWbqfpb2+pZUzs1aKb8EHzVVeHB4rBso0kukk1M2mvG2 CVJPPZWxmtHkHD6ixj0olq/xVA== 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_579494_356CB8FE X-CRM114-Status: GOOD ( 20.97 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.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: 11844449 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AEE6C433DF for ; Mon, 19 Oct 2020 14:09:54 +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 851F622263 for ; Mon, 19 Oct 2020 14:09:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V22JCLyN"; 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 851F622263 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-arm-kernel-bounces+linux-arm-kernel=archiver.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=wjR/fuB9iuxxZOXRk+Mi+JMD8emgmVT1CUJN06UC2zA=; b=V22JCLyNge7juhPqx/8/syvTX OeX9dRekBVlpIpdUBpAJ3lASoO+4VxNwdRIH2i7/QVqGGS5/Q2otiouPHnlNmMHm3pcoJPZJL24dp t9AJVeKBjK26sQHEUazS2RsjYbSWP9ksC1cCMjvp+veum4sE6SlHbaOG5lWlOOMv5QjJkOtEhnZOW UC2/zcNfalHHvCtN4JnoYTOuw+kVPtTEFdVJwGlLhM1Yjt7RqrCGLtsj/F4vFcLm4c8aWGAmtyaEJ d/Nd9D3J4kGXlzvZqqTZqPQ4WvE0kQGtvK6UCyTKhcx8d5CRYsGW6wFcLYrBuHXVHiqGT0uhKtCVK 6/e7fXaGw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpS-0004Zf-3o; Mon, 19 Oct 2020 14:08:02 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVoi-0004FP-EX for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 14:07:19 +0000 Received: by mail-wm1-x341.google.com with SMTP id p15so10425069wmi.4 for ; Mon, 19 Oct 2020 07:07:15 -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=CO0LYKAfeQCwFwFuXcvGFfHbZQQN/ANjoXZvmViOJs0Kq63YK+C9XkNcZT8LoFCcIA jvPxtb3gso0l18HEYjE9SNMqF6oRagQRPNAMyoCG/F8iOc2nM++UP4TSH6i/bzHv1qHB mkz1wTjyCAlSl9snE0eXbrPcoKk3vEWHFbLcPrBT+AfDxjYcCaj/61eSC603kHd3W3cF Jv1DtaRuaSsmwL1PykZBcOy2UvVt6WRa72nRE6pWM8Eo/kYmlYypYLrji9GlbSp4ghOJ Y5s4Osvffcwgmb2Ju01xtCkg/patytEkDhYqO8gOz0HDWkoiF+vd8e3XuDk5yDqe+AOT 8nPA== X-Gm-Message-State: AOAM533RmSXR/YlKvc7+sutxB4LoV2jALAoxZJrtHvayqInIhc0JWWfG kA28xgL3shmfXpdL85ke4v5MQw== 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_759838_E89853D6 X-CRM114-Status: GOOD ( 14.07 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.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: 11844451 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85092C433DF for ; Mon, 19 Oct 2020 14:09:59 +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 0AFC7222B8 for ; Mon, 19 Oct 2020 14:09:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SlUtTfdM"; 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 0AFC7222B8 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-arm-kernel-bounces+linux-arm-kernel=archiver.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=RHMvkZpaQC9FKVkAsIv+rnvHGalL1oAcoWZHdMFlvtc=; b=SlUtTfdMoCbFyze9OdnuWKdj/ 5bp5JSiBmtaPelGc+2WPjDo7wIK8Lh+ceDxP2pZQGmrTKlMMfQVcJIPOsTWxdhoktbXXdaXfDIUgK IAGfh66gbvez9TVqOPlvKXlOKkFuNbadPz8MHbkrhlSQZ4R/VVqCcVhOUH8xFTccwFXSW1ZfUhfbs 2f8Os+1LNVXRX2tOJjr9ulUdjXgdxOEXCX0MEqOBtupaCx2qq8MlpWAdjwagnV2URDIgEsYYmWHrl gOhLV2TP+fWbxkFJtUeSmqzsx0haCJrtWvujLF+y9xi/nFOqm8slC+KJCxdKgrZYUmcKYpbxnQ9Lt 6t33SwdQQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpb-0004eC-0s; Mon, 19 Oct 2020 14:08:11 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVoj-0004Fy-F7 for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 14:07:23 +0000 Received: by mail-wm1-x344.google.com with SMTP id a72so10428000wme.5 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=oJIFsF3iZgk5P8Qi9X4j7Wv4rlGPNY53LUAMxvjYwZ/dcs8YPyGyGHBFrqhcnIu+8k +N34qeX9zCxbTiYptwlpfc5iWU6hRLL0nUKD+bSN5ziHsLveR/opXuV2cptUbKMva6bp LtVjSRdTF8LhAxXD6GvlIvTbiJPi2bulz/Ehlm+7Ek4V6M4pyTbTgABqxu3PNznQb9o3 ANLHO6NTr7lrIorRlwqYvb/uGer8qDpQx7PEIpDfkfKcyzVNSem7u8h1yFCCxEvHYFnS ohUVOm5aIPSvkiJ2hsveMRn7QFQnPNXq38m5EJ2m6+PuWRCtCoKJuZ3+agGCQIbEwnAH 22dw== X-Gm-Message-State: AOAM530kO5ZAc3nErq3QESJ4EtVHfQr3+6KlKpCoAfT+FD7LCr59SOih ctABolpE/eV//o+w3LVcAh8EeA== 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_100717_891187_E3AB6C6C X-CRM114-Status: GOOD ( 12.89 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.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: 11844445 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59B0FC433E7 for ; Mon, 19 Oct 2020 14:09:59 +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 CE87C22263 for ; Mon, 19 Oct 2020 14:09:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1JxS3d7/"; 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 CE87C22263 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-arm-kernel-bounces+linux-arm-kernel=archiver.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=W5UfV/xSSUz25FgbRcILMzC8AHPy7uwjs2I3ThhYjfc=; b=1JxS3d7/w4kvkB8fln/zloNQb gGW+5nJTC4XYF+xwKA7Al3ZUBzt4ksiHJaueeSDKn+k7cvj/QzMjT5BI9nJjp76kwFoljszAHwX5s r+/bKmPcQhzez3P1WNuRePT/e8WkrWGgan6x7r1eQIBgkqCXAAaK0WqSl3zZwGMZUTv9RUYmPD3JN /wPYFfpFZ/rrno/mmtNkONbplmb54VTcwqaSOfzE22wNYFox4obUWMNZqJa26xhtRoazQzmkHc3oN sNDlyP8tFCoOk6YOnAsf1zl8MIgpkN1o+3+y43ccDVob0bF+pSmR5ijRXa8DI74O5odGRX00Dxv59 CP1PcWrjA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVpj-0004k7-JV; Mon, 19 Oct 2020 14:08:19 +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 1kUVom-0004Hn-Nh for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 14:07:28 +0000 Received: by mail-wr1-x443.google.com with SMTP id h5so11604854wrv.7 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=VrhHcWRhF4jwrHNcRf/2vb79/bjpL0g9aC2Jqa142wjYZitI2WkunrYvcKLV/VQ/s3 1LupGHv3ANsjbAMKPCOOMMkCJQlbabsXBowfIHEzW7UpItdPsuKpw34pn4N/76WouO+E djKEferHHcxXP/Pk9yYE9WckgquoDyvilMX+xIrkPiqkfk7mtw2Cy07ejgh0m2amcZgo 4/h4OQQBPez+AEg4t1mphVI2vk9Js+xVA6MVDAIe80eB0Y6eTdmuEfC6PW+sDi0q6cSg 1tHTqH3R0UQVyQsYEUx21Q7LyzqB7CfcNZ5i3c6yQBu1SUB/fwNAM/E5eYUP0mMnA0Qb QJAw== X-Gm-Message-State: AOAM531Ah7dN3LouUAiAMewEYWD44NSluw203ba+QD1/3g0svwH0BZMu EwOlwfMp0b2Ymn7JZbGNV1lWHQ== 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_215511_C0B338D6 X-CRM114-Status: GOOD ( 13.79 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.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"; +};