From patchwork Sun Nov 24 17:29:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11259249 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 35D72913 for ; Sun, 24 Nov 2019 17:31:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 100872075E for ; Sun, 24 Nov 2019 17:31:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="usHfb0KT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OYiNMLLI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 100872075E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=gjD2fmClQOfo8vhqJDdtrH0/2qIzFRZylyGkZtN3mPI=; b=usHfb0KTQjGRHz xUqa02suRy14eyYSzYEQcHjk0fW4S6sGg1x2zkqqA/Gl59RG31bvinIi/6O0SF/MJ9t3pFBsv4YGl 4iZ2xBhvXsJuYZdszBxN1J9snxg0mfxIiA66T75hxjwfTvfT55FrAR9692zinc1yOV1Lr4coQO9B5 A1xBJBii3UTZYfPFBxPJLZw6YrnmSX4MIRQfL3pg7GyfbGDBpcouNnMfaOUFevrTfJ+0Hyx18/z60 4ePUFGb43dNj0aOtXxJJxInv0cJKF9iLvJj9wv3pWdZqr7m52Q50zi9SCNtra8/EXLNXfy5LXHKtR etgKEEnrSLYKiKUaduzw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iYvjT-0007As-59; Sun, 24 Nov 2019 17:31:35 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iYviG-0005zH-Hg for linux-arm-kernel@lists.infradead.org; Sun, 24 Nov 2019 17:30:22 +0000 Received: by mail-wm1-x341.google.com with SMTP id b11so12697566wmb.5 for ; Sun, 24 Nov 2019 09:30:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Sjixo6ht7XiGZb8/LNb/8Q06mHVbU6wMmziG5mNnwig=; b=OYiNMLLI89jLaAYadwdPkm8CYT0XjYMPJ5j0/PepSiMjSKL7Ho/STOqUc4r2yA8SgD 2fSXE/uyQsx58Q93mYXDEGPk1joPHtLRGHOdJ4FeMWPiJ/Mz5s+nNY9k8w34jfVOHDB2 dKBcOKD5ar5yZfmeIF5ega5MCRvWQ5a7ma73aWzbjbCo7U5UqtEbi7cah2IIH2JIpsp0 wW8s/eHJzP1xxh3uz3xN/wK1V4wtL1z47YoZmCPDHOu7UI+eVUpKzClJ/LHqjFYekFJ4 93YidniTK30G3JkwscNuRpPRJKI3jFrQ8s8Z0PY3UkDKY2+izKO9Bf2LekGq7zrBjrRG C00w== 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=Sjixo6ht7XiGZb8/LNb/8Q06mHVbU6wMmziG5mNnwig=; b=r/jVjVYamUKF8VX0ttKBp8Zeuos882NTxfMUOrDn2IBJcUIk0l9J0t6/g5iXGJgacn NrhgEqc5L08UtBtsxibzCXTK22dsW2XJQw93j/G9yRZQ/ZRU9fcmeAQRvuXpv9FvUAcC eZFszpFywYyGknmIf0K+WLrBkbsL6Fc4cq+niHs/vSK6KS9wxI9e80lb4SRwkCKA6txD DeFvmU28Kt/Fuyq2SYLK4MpsTSqFjTcrEBNxgzEB1vVg+j9Z1cv6liFqhNKOpa8ffvZn U9kxro4tjHoyZvPzW03gxaHVpZoOWxtoEjVZFi0Z452UNgXAoBA1qTxTlyS5IDwAEzgT 1C2A== X-Gm-Message-State: APjAAAXRJp/wsuVjRSNqF/CmsDSiCgRd0Yza2vEKBc9FV1L4s3EGGKIr CO/O4W19i809n5DX0wJyNhQ= X-Google-Smtp-Source: APXvYqzdwq6I0QuiWDS1GB2PvZLPk9+ENLHHn5zVHJOxjm5uJwP+lPkagFhiQeWjWwyFSGT7X09ZbQ== X-Received: by 2002:a7b:c1d3:: with SMTP id a19mr6652300wmj.127.1574616618566; Sun, 24 Nov 2019 09:30:18 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:1f1:d0f0::4e2b:d7ca]) by smtp.gmail.com with ESMTPSA id n13sm5537275wmi.25.2019.11.24.09.30.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2019 09:30:18 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Maxime Ripard , Chen-Yu Tsai , Philipp Zabel Subject: [PATCH v9 6/6] pwm: sun4i: Add support for H6 PWM Date: Sun, 24 Nov 2019 18:29:08 +0100 Message-Id: <20191124172908.10804-7-peron.clem@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191124172908.10804-1-peron.clem@gmail.com> References: <20191124172908.10804-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191124_093020_957975_90A5D0E9 X-CRM114-Status: GOOD ( 12.68 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 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:341 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (peron.clem[at]gmail.com) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: linux-pwm@vger.kernel.org, Jernej Skrabec , linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?utf-8?b?Q2w=?= =?utf-8?b?w6ltZW50IFDDqXJvbg==?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Jernej Skrabec Now that sun4i PWM driver supports deasserting reset line and enabling bus clock, support for H6 PWM can be added. Note that while H6 PWM has two channels, only first one is wired to output pin. Second channel is used as a clock source to companion AC200 chip which is bundled into same package. Signed-off-by: Jernej Skrabec Acked-by: Uwe Kleine-König Signed-off-by: Clément Péron --- drivers/pwm/pwm-sun4i.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c index 07bf7be6074b..c394878c7e5d 100644 --- a/drivers/pwm/pwm-sun4i.c +++ b/drivers/pwm/pwm-sun4i.c @@ -360,6 +360,12 @@ static const struct sun4i_pwm_data sun4i_pwm_single_bypass = { .npwm = 1, }; +static const struct sun4i_pwm_data sun50i_h6_pwm_data = { + .has_prescaler_bypass = true, + .has_direct_mod_clk_output = true, + .npwm = 2, +}; + static const struct of_device_id sun4i_pwm_dt_ids[] = { { .compatible = "allwinner,sun4i-a10-pwm", @@ -376,6 +382,9 @@ static const struct of_device_id sun4i_pwm_dt_ids[] = { }, { .compatible = "allwinner,sun8i-h3-pwm", .data = &sun4i_pwm_single_bypass, + }, { + .compatible = "allwinner,sun50i-h6-pwm", + .data = &sun50i_h6_pwm_data, }, { /* sentinel */ },