[PATCH v5 3/3] pwm: meson: Add support for Amlogic S7

Xianwei Zhao via B4 Relay devnull+xianwei.zhao.amlogic.com at kernel.org
Mon Nov 30 03:59:23 PST 2026


From: Xianwei Zhao <xianwei.zhao at amlogic.com>

Add support for Amlogic S7 PWM. Amlogic S7 different from the previous
SoCs, a controller includes one pwm, at the same time, the controller has
only one input clock source.

Reviewed-by: Alexandre Mergnat <amergnat at baylibre.com>
Signed-off-by: Xianwei Zhao <xianwei.zhao at amlogic.com>
---
 drivers/pwm/pwm-meson.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 422aa8bb20b4..e13206c40984 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -653,6 +653,13 @@ static const struct meson_pwm_data pwm_s4_data = {
 	.npwm = 2,
 };
 
+static const struct meson_pwm_data pwm_s7_data = {
+	.channels_init = meson_pwm_init_channels_per_channel_clk,
+	.has_constant = true,
+	.has_polarity = true,
+	.npwm = 1,
+};
+
 static const struct of_device_id meson_pwm_matches[] = {
 	{
 		.compatible = "amlogic,meson8-pwm-v2",
@@ -663,6 +670,9 @@ static const struct of_device_id meson_pwm_matches[] = {
 	}, {
 		.compatible = "amlogic,meson-g12-pwm-v2",
 		.data = &pwm_meson_axg_v2_data
+	}, {
+		.compatible = "amlogic,s7-pwm",
+		.data = &pwm_s7_data
 	},
 
 	/* The following compatibles are obsolete */

-- 
2.52.0





More information about the linux-arm-kernel mailing list