linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Clément Péron" <peron.clem@gmail.com>
To: "Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Philipp Zabel" <pza@pengutronix.de>
Cc: linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
	"Jernej Skrabec" <jernej.skrabec@siol.net>,
	"Clément Péron" <peron.clem@gmail.com>
Subject: [PATCH v8 6/6] pwm: sun4i: Add support for H6 PWM
Date: Thu, 21 Nov 2019 20:59:02 +0100	[thread overview]
Message-ID: <20191121195902.6906-7-peron.clem@gmail.com> (raw)
In-Reply-To: <20191121195902.6906-1-peron.clem@gmail.com>

From: Jernej Skrabec <jernej.skrabec@siol.net>

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 <jernej.skrabec@siol.net>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 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 0fe9c680d6d0..84f3ccab47f9 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 */
 	},
-- 
2.20.1


      parent reply	other threads:[~2019-11-21 19:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 19:58 [PATCH v8 0/6] Add support for H6 PWM Clément Péron
2019-11-21 19:58 ` [PATCH v8 1/6] pwm: sun4i: Add an optional probe for reset line Clément Péron
2019-11-21 19:58 ` [PATCH v8 2/6] pwm: sun4i: Prefer "mod" clock to unnamed Clément Péron
2019-11-21 19:58 ` [PATCH v8 3/6] pwm: sun4i: Add an optional probe for bus clock Clément Péron
2019-11-21 21:05   ` Uwe Kleine-König
2019-11-21 21:31     ` Clément Péron
2019-11-21 19:59 ` [PATCH v8 4/6] pwm: sun4i: Always calculate params when applying new parameters Clément Péron
2019-11-21 21:11   ` Uwe Kleine-König
2019-11-21 19:59 ` [PATCH v8 5/6] pwm: sun4i: Add support to output source clock directly Clément Péron
2019-11-21 21:16   ` Uwe Kleine-König
2019-11-21 21:21     ` Clément Péron
2019-11-23 14:05       ` Clément Péron
2019-11-23 20:00         ` Uwe Kleine-König
2019-11-21 19:59 ` Clément Péron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191121195902.6906-7-peron.clem@gmail.com \
    --to=peron.clem@gmail.com \
    --cc=jernej.skrabec@siol.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mripard@kernel.org \
    --cc=pza@pengutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).