From patchwork Wed Feb 14 14:04:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13556584 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 C04AAC48BC3 for ; Wed, 14 Feb 2024 14:05:24 +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=ZApfb39VIvflb7sKZtN4xJxRH98M5p8GHUWubnr5uk4=; b=Hn9/3Qqd1oqwrn UBfvMIhxmSomgk8xOTnHIdJxquzMMcz6n8dg2f1yQm5YxEG5UpTw0u/q/T+oPfxFMeDqwqmFhIXdG JFl7MQBhoMT54rCNZ9wjqMkRMInR4eoTPC5CkxMQMFpH+nNGwxyzsZJTngoSJYaEi9bZy/mPFalE3 UoisNvulehbPyniLlNoOJhHUwEaFR+GibbUQfDyKndrxSXAnxwilgVyHxXPuGuov2Hyj6+UNmU3et HZR0Wck4ZJeVPHyioSXwmQmSUOybYFKA354xzu+/eHBsLy+X+zglTEiXqHBUoYFeesc1LguAMP0ls U3XIVANjQwLZoskIr7oA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raFso-0000000D79R-2TGs; Wed, 14 Feb 2024 14:05:06 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raFsl-0000000D78u-23IX; Wed, 14 Feb 2024 14:05:04 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-561f4bc306fso2223257a12.1; Wed, 14 Feb 2024 06:05:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707919501; x=1708524301; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=z7Q1BpdFE96j/+901jCtibE5f/f88ZZPNniLXRQM0DA=; b=HyClbut98SBEcXYscIg4uonATyKLQnSkqjnYuUnhJjs8IetXsy0zl6gLVWQgB78hnN JmrETvIsHOH9A/wXtQAqepZsaNZ4RvTS+p5GPRSSSQTQRrisdZfdzGi0nQ5wWgtT0JOC g5we+WGY3SgomdCzuQaogTqMaIndTgw+XZ8RJxwmAMChd2sCYMmN4Clc3hODMQAZzKfg cegyQoXLYkjjODRpVRPBRSIqEUsqbi8nzc+WoznnbXSYFwEABr3C1NqZg5eUw8DeJf8t aGUWCTj2QvSL7N00ILhkBye5gZhYPndyT+wdxfTMK6wgHfNspsD1/lbdc50+He2rGzZ7 zbdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707919501; x=1708524301; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=z7Q1BpdFE96j/+901jCtibE5f/f88ZZPNniLXRQM0DA=; b=Ci/CNGNWxgCZxgPt/66SKsVp1zxq586YOmEeOnk7m6Dh+0I9zRfrYW8D5E2jqo8rmt oKBg7oAX35GUhd4JswWjLV77YVY57g/27o47a4RSSQLv7SZxq+RT0IvOSD+DiQCzKLoT 51VHuYVlKKlbSgv0BTdH1btu5AnrivxnhDSlF5gHG7R0MWrcZ3n/dLmBwZnffsAEYtSN RfGjwzWI2M9yFz5Jq19uh/9xlzSC2iqZI3tq0vqsyFlOjzBLInmBdxseGuQzKi7cOLs/ 5ik7YCGnd0sSYY0Hpst7kQiV0k9tVKtzE0ekFaBCOdg/H5gWXldP4r8RpWEx+BgGmHrD HE/g== X-Forwarded-Encrypted: i=1; AJvYcCVW2Qprq7ZqGkM2ZveMiFE3FGUIB7VVyJHcMiVohmr7c7g4YB9qARHJFleKHx17HhDkc/82MjXVend2gbUVnTqlCcXsYa2gWTM0L3w6ED1qqQLET125iIvj8dQAVkHu/IhPkAhhwKLmLaliqHFo0g+ZGpQj/11tMNY= X-Gm-Message-State: AOJu0YzDBPhnSxjPo/Idekmh0xNo7xWVixFFxfDi6YfHt1Pfky/1WM6w Wp15bH0vY/6YIlpjhWnEbe9lFdyUlZF1FjKqPbmXrlJNXpJauCJX X-Google-Smtp-Source: AGHT+IHV5lTBSsU2P4rgMTuePMzPF3w3ljb7dMNL+67Z2B7qY19FGGj9oQip/nDTMA6wH9kRqjNzqg== X-Received: by 2002:aa7:c61a:0:b0:560:799:f802 with SMTP id h26-20020aa7c61a000000b005600799f802mr1932526edq.21.1707919501304; Wed, 14 Feb 2024 06:05:01 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUtmzNXaugjkX2Lbay0q+RsXHbXxui68JmgAB7AAmk4fN6jM65+wulw9ikFfckzf4uYl4dacm8xHp/v2UQatJoXIMh9DdY4tfvpVmwaS8QRN26anrUvaF40ZtJauATQNUIsMTq7FYNnfRokS3gSUXM2eLI33PzYCSVvpQiDHEuJk81vMeQX2XhGl6jYHsBVrk22H67C4u8N+drhgxpW2To1xIPETJ8yOjudZKLtwmBEIvy/VaytbZGFC5FcZQBMSl1/azpXi+FC16ov9Iv4Tz+CikGEFzMUZxfRTlukzTpTaSDTWrlC5aEYVUl0EaWshVPu+v9XjqKmshRUdwH7HGTkIprdv/AYXAXMiFYqDqplLuVKPHl/OmnMHinF+8gTyWy/2P6Gd8pfN09kXEM6KlzG4q+VuzFZHKCYPtrc72Z67u21U0VQJzM5lPAOlld1uLGGuJoHHWrhGCkvLqV1zYzp77iazMGiQSMqtOk1/a2fQuY13LupsaYThSx/+PlTPg== Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id p23-20020a056402501700b005614409022esm4700646eda.63.2024.02.14.06.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 06:05:00 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Matthias Brugger , AngeloGioacchino Del Regno , John Crispin , 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, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988 Date: Wed, 14 Feb 2024 15:04:53 +0100 Message-Id: <20240214140454.6438-1-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_060503_556638_C9B87704 X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. 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 From: Rafał Miłecki MT7988 has on-SoC controller that can control up to 8 PWM interfaces. It differs from blocks on other SoCs (amount of PWMs & registers) so it needs its own compatible string. Signed-off-by: Rafał Miłecki Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno --- V2: Explain new compatibility string reason in commit body Documentation/devicetree/bindings/pwm/mediatek,mt2712-pwm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pwm/mediatek,mt2712-pwm.yaml b/Documentation/devicetree/bindings/pwm/mediatek,mt2712-pwm.yaml index 0fbe8a6469eb..a5c308801619 100644 --- a/Documentation/devicetree/bindings/pwm/mediatek,mt2712-pwm.yaml +++ b/Documentation/devicetree/bindings/pwm/mediatek,mt2712-pwm.yaml @@ -24,6 +24,7 @@ properties: - mediatek,mt7629-pwm - mediatek,mt7981-pwm - mediatek,mt7986-pwm + - mediatek,mt7988-pwm - mediatek,mt8183-pwm - mediatek,mt8365-pwm - mediatek,mt8516-pwm From patchwork Wed Feb 14 14:04:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13556585 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 56640C48BC3 for ; Wed, 14 Feb 2024 14:05:27 +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=d6M9wKeJhvX4jkJcDgxYwuGPUruFpOfN2BMIauNRZbk=; b=DSZQRZ8ms+4FVX LgurPdhHjmd+K9eugHmNp2z+O9AKFRabGZdf1VBRJnrb+vsJgya757MEnaKXpFbfHUeUz7o9tMMMU wJbNlPw9r9JLuywU3aZstNoNWZD3beoOpxqsdDBsZ6orhcTzq4UhUZDI0B7INQa+Y+7+1iEMPbmDo kbupcWC1RaNfqPNiBL76hYQMLkfzXDjcWx2MOP6Irg+1xgWr/aXd0t2tFXenxLabQ2X9KYefeo8VH DPvjCoYzNWaADZwzYduWrLUXkuXVhEpmS6ICsSDpNGP3sgcUAy34HUjrxapDYr+LPS0HCLTcxuIQK yyB1OdUDDp4YoSh+PztQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raFst-0000000D7Aw-1AjG; Wed, 14 Feb 2024 14:05:11 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raFsq-0000000D79k-25Sj; Wed, 14 Feb 2024 14:05:09 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5600c43caddso6653833a12.2; Wed, 14 Feb 2024 06:05:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707919506; x=1708524306; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Wp9yTCv8Nkx/po83XyeQipiHIFHlL3sjSTw5FvYRdgw=; b=lDRmibaTzM5ovonyqo5x9jWp8u6Gc6CAryjlmYIlPRhPYpeKsfUSJgeeLekmotGHTS jfd127/DlWkHvvSAb+d5g2MvL+EkLVDIq0E6XvoPRY8P/LmnDPU/moa3YGTi78lSx2SE EOTTRt8LqJfUZE59aLVlaIlV/SRRVTDPqzBQ/XDUkmKSI/4/8IJ8FRY0YI38uukvMaaJ O6GDEhVquS2mGuqfRAjQS/jbMdmKvn90gFr/AHkcEUdbJUMMAIlLo56HfxpR3o85ewY8 KwPi3SSXXfIN4XcthZk3GpyPTLiJ4fHag5Ak2HmQtUnAJaCCeosCLZuQOb9GYO0JwyPR 6DNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707919506; x=1708524306; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wp9yTCv8Nkx/po83XyeQipiHIFHlL3sjSTw5FvYRdgw=; b=huSc8+XfDL7LcuPVq2mfZLqDVeHHIo2Dhn8a3OBUrxzdXCha0TK/yRW7NlLs8cahvh Q0z1zTNWvOlONHaMmkjbuBz8BMcoj+mWgbQw7qSFXf6ku91JuI8wtVId5Dq4CUThi3tu AcHkfmOUtYrDiNVjCIHzm7T/s/jRVThthlol+XvKV+oyU3C1EY2nd99VjJkJYMqUBjQ4 5ZNCHDOSC1qvhrWr1LXzo8j2YrK8vXsyecSrxzqtlAy4FCLYwuIhK84UbzqQv21IQ+OQ ZuYVHgJYc+vsbDapYm7uekEVir4DWfqJ767j3MwrV67p3W6uL6Wjc6DVWXcgUBjN3CgE RRCQ== X-Forwarded-Encrypted: i=1; AJvYcCVHQvM+3zqs4kvcSfo+tt8Ee3t1Z58Hn4eWQM/k/38c8mCOtBqMvx1ViMaoDw7NFgeptCRFLH37yHxdUI60FOr0fJyYgz3rioHXCRF1gwcRUDiO9uAUmJTE0PsKyh/1nHXkAWIdMrKh/TTkPV+aK1PX/7XOVHrLHTY= X-Gm-Message-State: AOJu0YxaS24AkO/DhV0tCC2rDXCSy3GHfNcMoJXIyVq120spml0yjcmQ EwGKGVc97mzgWaQO8YpVrdhGk+lX3NeZxLD3h5+DTDCmZuLcP0vO X-Google-Smtp-Source: AGHT+IGd8MaMO4iogIBuFJz8TmdoIxMvob4CDHybYmI+oXS2kWaWWHs6MOISz80HK5iFOoRO2UzsnQ== X-Received: by 2002:aa7:c441:0:b0:55f:c5b7:5855 with SMTP id n1-20020aa7c441000000b0055fc5b75855mr1908358edr.6.1707919506394; Wed, 14 Feb 2024 06:05:06 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUuZaHwkIiWbn2mb38Z67j0i1WOdtMavF2LwMIhs+ISKRDeoL3SPtJfhfpXrqP8xyBJtN2liwmPWeZgHqVpXUzaMtOzfHSMc+Ta6bhQIuoLGhbTHAIXsianp6EX9ql0tt704xppvax/L+ji3m7NcTqOPHEtWUgdZsIhFsv+t/Dtq654PuFL05UAwO/+hpwpbAGWbSTz0vAADuias4zMTxv67C5f8UF9lmRhoCC3kxjuJLRV159K+opxXWaxIrTsc8R5vCP4HCYFGT21x9FRO871Fzt51mYZiO+QULaS6Y12ccanNuE+dP0e2FDcmLqBxFzkTE1fQM3AcwA4eE8idTAfOhg6Vefx5KsuX9MHqgHOWYCS1JhRjO1m6uGiBfAwZQPRSdQMCrtcS5UGvFEeRfkghzPWhbfuKbn3pYM/hzOeDX6Z+sE6WsODL699ZGbX9NuHP5QkKqCiPJ5UjzneSvILjjPIHEQ1eK56akkER0ZnYKxxg/59WSqNEfPgX5UG9A== Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id p23-20020a056402501700b005614409022esm4700646eda.63.2024.02.14.06.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 06:05:05 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Matthias Brugger , AngeloGioacchino Del Regno , John Crispin , 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, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V2 2/2] pwm: mediatek: add support for MT7988 Date: Wed, 14 Feb 2024 15:04:54 +0100 Message-Id: <20240214140454.6438-2-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240214140454.6438-1-zajec5@gmail.com> References: <20240214140454.6438-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_060508_572111_EE2AF6EE X-CRM114-Status: GOOD ( 12.23 ) 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 From: Rafał Miłecki MT7988 uses new registers layout just like MT7981 but it supports 8 PWM interfaces. Signed-off-by: Rafał Miłecki Reviewed-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno --- V2: New patch in the series drivers/pwm/pwm-mediatek.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c index 562102a47ac0..292c8bd5b343 100644 --- a/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c @@ -339,6 +339,13 @@ static const struct pwm_mediatek_of_data mt7986_pwm_data = { .reg_offset = mtk_pwm_reg_offset_v1, }; +static const struct pwm_mediatek_of_data mt7988_pwm_data = { + .num_pwms = 8, + .pwm45_fixup = false, + .has_ck_26m_sel = false, + .reg_offset = mtk_pwm_reg_offset_v2, +}; + static const struct pwm_mediatek_of_data mt8183_pwm_data = { .num_pwms = 4, .pwm45_fixup = false, @@ -369,6 +376,7 @@ static const struct of_device_id pwm_mediatek_of_match[] = { { .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data }, { .compatible = "mediatek,mt7981-pwm", .data = &mt7981_pwm_data }, { .compatible = "mediatek,mt7986-pwm", .data = &mt7986_pwm_data }, + { .compatible = "mediatek,mt7988-pwm", .data = &mt7988_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 },