Skip to contentSkip to conversation

dt-bindings: pwm: add MT8365 SoC binding

PATCH In review Fabien Parent 4 participants 6 messages May 30, 2022 – Jun 22, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 dt-bindings: pwm: add MT8365 SoC binding

Add binding documentation for the MT8365 SoC.

---
v2: fix clock description (five -> three)

 Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/pwm/pwm-mediatek.txt +2 -0
index 25ed214473d7..ff792512399b 100644
@@ -8,6 +8,7 @@ Required properties:
    - "mediatek,mt7628-pwm": found on mt7628 SoC.
    - "mediatek,mt7629-pwm": found on mt7629 SoC.
    - "mediatek,mt8183-pwm": found on mt8183 SoC.
+   - "mediatek,mt8365-pwm": found on mt8365 SoC.
    - "mediatek,mt8516-pwm": found on mt8516 SoC.
  - reg: physical base address and length of the controller's registers.
  - #pwm-cells: must be 2. See pwm.yaml in this directory for a description of
@@ -17,6 +18,7 @@ Required properties:
                 has no clocks
    - "top": the top clock generator
    - "main": clock used by the PWM core
+   - "pwm1-3": the three per PWM clocks for mt8365
    - "pwm1-8": the eight per PWM clocks for mt2712
    - "pwm1-6": the six per PWM clocks for mt7622
    - "pwm1-5": the five per PWM clocks for mt7623
Signature · 1 line
2.36.1
#1 lore raw

PATCH v2 2/2 pwm: mediatek: add MT8365 support

Add support for PWM on MT8365

---
v2: no changes

 drivers/pwm/pwm-mediatek.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/pwm/pwm-mediatek.c +7 -0
index 568b13a48717..fd586bc51c5f 100644
@@ -294,6 +294,12 @@ static const struct pwm_mediatek_of_data mt8183_pwm_data = {
 	.has_ck_26m_sel = true,
 };
 
+static const struct pwm_mediatek_of_data mt8365_pwm_data = {
+	.num_pwms = 3,
+	.pwm45_fixup = false,
+	.has_ck_26m_sel = true,
+};
+
 static const struct pwm_mediatek_of_data mt8516_pwm_data = {
 	.num_pwms = 5,
 	.pwm45_fixup = false,
@@ -307,6 +313,7 @@ static const struct of_device_id pwm_mediatek_of_match[] = {
 	{ .compatible = "mediatek,mt7628-pwm", .data = &mt7628_pwm_data },
 	{ .compatible = "mediatek,mt7629-pwm", .data = &mt7629_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 },
 	{ },
 };
Signature · 1 line
2.36.1
Acked-by on v2 1/2
#3 lore raw
In reply to Fabien Parent
Quoted 5 lines · Fabien Parent

Add binding documentation for the MT8365 SoC.

---
v2: fix clock description (five -> three)

LGTM:

If you want to further improve: This binding document wants to be converted to yaml.

Best regards
Uwe

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