From patchwork Mon May 30 20:21:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864941 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 9712CC433EF for ; Mon, 30 May 2022 20:23:18 +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=VPmUhlWM82YGon2On513DYO/VdE0c27jFtZv5XIG0mc=; b=1l0pFvzapcPCkp 0SFYryvSiQdzhNzjC7xz0Sl4C+bsg/usfoQmeuf7F0S2RB/xzNIlelTsVYJNch8IHZAHNIPabV+mB vlfl/tiIQStNWl73YUqGE1aMyYa6Aqm6MNnxMpqpPRFR/6sCFkGiAAMTPTopoo6UyC72J33bMx/ow FG9lxXDyY88TvVeF729KXo3Cd0SUrGApIovfadTxjEcgI/2capvYuAB0ch8sRNu9wpzrutvu0uAfQ +NM+UPZl04K/flTq70jLJ3j6Asu1Ozoz0GRYp3p0R9bhU4+dp3GMCJoaFAp2eeGAUfbqVL1R3sdFk VxmRGzCOctnRXaRZYgAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvltn-008ByF-Fp; Mon, 30 May 2022 20:21:59 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvltg-008Bul-Tg for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:21:56 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 129-20020a1c0287000000b003974edd7c56so147922wmc.2 for ; Mon, 30 May 2022 13:21:51 -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=eiDOJFzaInCJhnUpiGhTUeinv2gyCwbF/a7PS9tPsw8=; b=GGLTks7z+Cu2sD67ItYjIkSDBnPFbXlry0Yr2hBSF7OQkd9rKRwnYFKllacNxl2clO jWHHOCWRt3kxSiYR5U8LKYbDItbOm17Myh6fQPHght6fxMCiy8WPnyuQfqXiN0teNpjJ 6TpUF6rm3KWf64/X882oAL/sIwnxRDF8w3VwkUWFYx755AxKaLVLTGpTOXQ8i7LsSMYx 7mzkX6zpqpUTcc4ilmGiuAEnAgtOWEXfl2cJre2phoWZmTy7Uy9Hz0t18CM3WF2b/mBh wAe+zJhJJj9rsXLXTbkOT8W1F71HrBAjoTvICAXgTHNJ5CM3mbqVBujloyWQh8SlM7x7 W5Zw== 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=eiDOJFzaInCJhnUpiGhTUeinv2gyCwbF/a7PS9tPsw8=; b=hw803F4INMHmjP2qE16NBM74rM9l9NUzqpgaz7joffEPanGdtFJEDc6lGUCmeaQ+tN nrpJNuWkFsQAiqiDmz0FdGGkZC9HDit09FD2AcO7wTBT+U6w8POveGxEXvZQstmDTo9z RA5lmc1+GzXM9C2RZ0PHuGQEF3SpncQ+2DeD4WAwpT579A3qkeAOio8KSpAVglT+ck53 CzR1bbbGj+8aru0SntB030mP0hErJnXAAbYywkoY5AnIIMZLkExfQEdzQS4F72/60kLY PcyKWTYI/yffsSq/mDuI8FAsaxYm1pg760mXqr2wrvg0GlVvz8XClyzqI5YkcBhyfpgg 3UbQ== X-Gm-Message-State: AOAM532ng8UM3dMoKLbLJ+8cd3TK1iouLeMGCjEoPIINJMRJWm4GLZtN TGEUjdcx+NwewYf+KrOWLesISkzfkKRsrrQV X-Google-Smtp-Source: ABdhPJxAETeJdaqhq72lFl2LUU+Ioc+InFtkW1WnYu123vrwlMVWG/bC/IKO0H+s9HT4NX5FMo8g+w== X-Received: by 2002:a05:600c:48aa:b0:397:55ba:adb3 with SMTP id j42-20020a05600c48aa00b0039755baadb3mr20239263wmp.73.1653942110348; Mon, 30 May 2022 13:21:50 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id q9-20020a1cf309000000b0039754d1d327sm261860wmq.13.2022.05.30.13.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:21:49 -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 1/2] dt-bindings: pwm: add MT8365 SoC binding Date: Mon, 30 May 2022 22:21:34 +0200 Message-Id: <20220530202136.906407-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_132153_056497_61CD94F7 X-CRM114-Status: GOOD ( 12.57 ) 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 --- 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..ac5c58bbb22d 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 five 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:21:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864942 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 386B8C433F5 for ; Mon, 30 May 2022 20:23:25 +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=Isrnkj8sRdVEQr31jyxp3klvRt01In7zHEaByjJcWcY=; b=L+OZlnWj0FXsaV xKKqemyq+l/zZN7if2ztiWWpsUSupeUbSAFzcHJmQrqWOW39oOX4nqvjBfa7TqDfcOGw3Y+FU/5Ju 1qgrPGaC58xHuU3YbwAxFq93K5HyvzQGcZu1qNAotzQaxMG7tsmt6g/oApdtwnye9cNvhescPY0+Y Za3zchKrgjMMq39VzIeryJx3cI67cuDQt9fgbaTcVzWx8lvAaWES/vtyfGZRT/obzZI1Y0Z5LZN+i QZXDQRbCTOQhoxI25i7RcNDR5i2m8+sPktkqLZZQWuGIiz97Deo7XfdHJrI8HMO5GUN+XWC5jKGz6 tT+1RIQRW2eADLj54qEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvlu6-008C4u-JV; Mon, 30 May 2022 20:22:18 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvlth-008BvW-SC for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:21:57 +0000 Received: by mail-wr1-x42f.google.com with SMTP id e25so5402439wra.11 for ; Mon, 30 May 2022 13:21:53 -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=L1vM38OHwAw07wuSGNIKDmB9lfDMUrNeDwo+6N+zaQs=; b=rbdYWKHYaxO3Oo8biiJo4zPn/Ul+w5RbkvyVOEB3/4mnXnlGjHkQehTA3Koq7wkzna FanKAs5XeFi7bavoqnYVyXkGtIJPIdz1+W1Nm8pyYiizUkUEFFw2pkjPoQl2uq6c9/z5 nSjTLmzejeBhrDY4LRaF1mPc7TLZboHRNtzkdVCZAYdDl8Tw1T1NXswiZGzXbcHfoePd uFR+KgaUg1jZpAie1lzpXFgk/wiMyjpTZdAZ5Dmq3QX0LgO3CAmoNXcqRjRrVBXUeK9q othnVsbT+f1fp5rxwduR7JhVfhUemm9rQOBeheHbp9zfpzNfinf4FFdNzteofmqhara0 hCIg== 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=L1vM38OHwAw07wuSGNIKDmB9lfDMUrNeDwo+6N+zaQs=; b=cMKeo8O+Kx4TCJurRzD1tooJvFyljDiRhpTOMG4uyGh0hSvT0fzPpmdiL5JhYqGbec fzgIUSJEL+ltdVX2S8oTe0lrKwX8NoN7pC3fmWkOdv0GqebjxXdsYtLKfaxxk1n2rM67 Q2NEGr/ml0/nOWVe6J1clovGG+QbQWJ6USGgqa17DTBRK207i3JwOEFMwDk2TdK9vL38 R1giftFrwWG77llC5lyoERIb990KSQGc7dOaHE3RM8V15AM0tF5Sg44EH3uEa5bsrZmh yx28s7KS5eyKx149tnKUX7Bl+sq0cX+sbRPotJLQmIOgbLnW/kKRpcjIjzNlUUq00Ym4 8Hqw== X-Gm-Message-State: AOAM530yMG/aVc/g5/t8/ARSe0NdPlEXZV/heq9T1lbL6wInkf49I2bj bj2Ak2oCfqVJjcck31WnNc5okA== X-Google-Smtp-Source: ABdhPJzqnMXzNaCigIjz1GAjTxyI8tshTxFw9D7Ucx2lKOehy+yE5Khqw9vdo4X+p+YlrV2WOmcARw== X-Received: by 2002:adf:fb04:0:b0:20c:dcbb:95bc with SMTP id c4-20020adffb04000000b0020cdcbb95bcmr47590696wrr.393.1653942112182; Mon, 30 May 2022 13:21:52 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id q9-20020a1cf309000000b0039754d1d327sm261860wmq.13.2022.05.30.13.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:21:51 -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 2/2] pwm: mediatek: add MT8365 support Date: Mon, 30 May 2022 22:21:35 +0200 Message-Id: <20220530202136.906407-2-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220530202136.906407-1-fparent@baylibre.com> References: <20220530202136.906407-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_132153_980577_792751F6 X-CRM114-Status: GOOD ( 12.39 ) 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 --- 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 }, { }, };