public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988
@ 2024-02-14 14:04 Rafał Miłecki
  2024-02-14 14:04 ` [PATCH V2 2/2] pwm: mediatek: add support " Rafał Miłecki
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Rafał Miłecki @ 2024-02-14 14:04 UTC (permalink / raw)
  To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Matthias Brugger, AngeloGioacchino Del Regno, John Crispin,
	linux-pwm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

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 <rafal@milecki.pl>
---
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
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH V2 2/2] pwm: mediatek: add support for MT7988
  2024-02-14 14:04 [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988 Rafał Miłecki
@ 2024-02-14 14:04 ` Rafał Miłecki
  2024-02-14 14:12   ` Daniel Golle
  2024-02-14 15:57   ` AngeloGioacchino Del Regno
  2024-02-14 15:44 ` [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible " Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 7+ messages in thread
From: Rafał Miłecki @ 2024-02-14 14:04 UTC (permalink / raw)
  To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Matthias Brugger, AngeloGioacchino Del Regno, John Crispin,
	linux-pwm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

MT7988 uses new registers layout just like MT7981 but it supports 8 PWM
interfaces.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
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 },
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH V2 2/2] pwm: mediatek: add support for MT7988
  2024-02-14 14:04 ` [PATCH V2 2/2] pwm: mediatek: add support " Rafał Miłecki
@ 2024-02-14 14:12   ` Daniel Golle
  2024-02-14 15:57   ` AngeloGioacchino Del Regno
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Golle @ 2024-02-14 14:12 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
	John Crispin, linux-pwm, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek, Rafał Miłecki

On Wed, Feb 14, 2024 at 03:04:54PM +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> MT7988 uses new registers layout just like MT7981 but it supports 8 PWM
> interfaces.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Reviewed-by: Daniel Golle <daniel@makrotopia.org>

> ---
> 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 },
> -- 
> 2.35.3
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988
  2024-02-14 14:04 [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988 Rafał Miłecki
  2024-02-14 14:04 ` [PATCH V2 2/2] pwm: mediatek: add support " Rafał Miłecki
@ 2024-02-14 15:44 ` Krzysztof Kozlowski
  2024-02-14 15:57 ` AngeloGioacchino Del Regno
  2024-02-15 11:34 ` Uwe Kleine-König
  3 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-14 15:44 UTC (permalink / raw)
  To: Rafał Miłecki, Uwe Kleine-König, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Matthias Brugger, AngeloGioacchino Del Regno, John Crispin,
	linux-pwm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, Rafał Miłecki

On 14/02/2024 15:04, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> 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 <rafal@milecki.pl>
> ---

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988
  2024-02-14 14:04 [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988 Rafał Miłecki
  2024-02-14 14:04 ` [PATCH V2 2/2] pwm: mediatek: add support " Rafał Miłecki
  2024-02-14 15:44 ` [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible " Krzysztof Kozlowski
@ 2024-02-14 15:57 ` AngeloGioacchino Del Regno
  2024-02-15 11:34 ` Uwe Kleine-König
  3 siblings, 0 replies; 7+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-14 15:57 UTC (permalink / raw)
  To: Rafał Miłecki, Uwe Kleine-König, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Matthias Brugger, John Crispin, linux-pwm, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek,
	Rafał Miłecki

Il 14/02/24 15:04, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> 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 <rafal@milecki.pl>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2 2/2] pwm: mediatek: add support for MT7988
  2024-02-14 14:04 ` [PATCH V2 2/2] pwm: mediatek: add support " Rafał Miłecki
  2024-02-14 14:12   ` Daniel Golle
@ 2024-02-14 15:57   ` AngeloGioacchino Del Regno
  1 sibling, 0 replies; 7+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-14 15:57 UTC (permalink / raw)
  To: Rafał Miłecki, Uwe Kleine-König, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Matthias Brugger, John Crispin, linux-pwm, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek,
	Rafał Miłecki

Il 14/02/24 15:04, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> MT7988 uses new registers layout just like MT7981 but it supports 8 PWM
> interfaces.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988
  2024-02-14 14:04 [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988 Rafał Miłecki
                   ` (2 preceding siblings ...)
  2024-02-14 15:57 ` AngeloGioacchino Del Regno
@ 2024-02-15 11:34 ` Uwe Kleine-König
  3 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2024-02-15 11:34 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, John Crispin, linux-pwm, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek,
	Rafał Miłecki

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

Hello,

On Wed, Feb 14, 2024 at 03:04:53PM +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> 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 <rafal@milecki.pl>
> ---
> V2: Explain new compatibility string reason in commit body
> 
>  Documentation/devicetree/bindings/pwm/mediatek,mt2712-pwm.yaml | 1 +
>  1 file changed, 1 insertion(+)

Applied both patches to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next

Best regards and thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-15 11:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-14 14:04 [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible for MT7988 Rafał Miłecki
2024-02-14 14:04 ` [PATCH V2 2/2] pwm: mediatek: add support " Rafał Miłecki
2024-02-14 14:12   ` Daniel Golle
2024-02-14 15:57   ` AngeloGioacchino Del Regno
2024-02-14 15:44 ` [PATCH V2 1/2] dt-bindings: pwm: mediatek,mt2712: add compatible " Krzysztof Kozlowski
2024-02-14 15:57 ` AngeloGioacchino Del Regno
2024-02-15 11:34 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox