Skip to contentSkip to conversation

Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format

PATCH Superseded [email protected] 2 participants 11 messages Mar 24, 2022 – Mar 30, 2022

Subsystems (3)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v4 cover Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format

From: Xinlei Lee <[email protected]>

Changes since v3:
1. Combine multiplexed socs into one entry

Changes since v2:
1. Modify the PWM name to DISP_PWM.
2. Include pwm.yaml.
3. Separate conversion files and add/remove operations.

Changes since v1:
1. Fixed formatting issues mentioned in the v1.
2. Delete pwm-mtk-disp.txt.
3. Add mtk_pwm dt_maintainers.
4. Add "#pwm-cells" & power-domains properties.
5. Make dt_checking successful.

Xinlei Lee (6):
dt-bindings: pwm: Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml
format
dt-bindings: pwm: Remove compatible for MediaTek MT8167
dt-bindings: pwm: Add compatible for MediaTek MT8183
dt-bindings: pwm: Add compatible for MediaTek MT8192
dt-bindings: pwm: Add compatible for MediaTek MT8195
dt-bindings: pwm: Add compatible for MediaTek MT8186

 .../bindings/pwm/mediatek,pwm-disp.yaml       | 69 +++++++++++++++++++
 .../devicetree/bindings/pwm/pwm-mtk-disp.txt  | 44 ------------
 2 files changed, 69 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt
Signature · 1 line
2.18.0
#1 lore raw

PATCH v4 1/6 dt-bindings: pwm: Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format

From: Xinlei Lee <[email protected]>

Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format as suggested by maintainer

---
 .../bindings/pwm/mediatek,pwm-disp.yaml       | 65 +++++++++++++++++++
 .../devicetree/bindings/pwm/pwm-mtk-disp.txt  | 44 -------------
 2 files changed, 65 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml new file +65 -0
new file mode 100644
index 000000000000..f844695d605a
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/mediatek,pwm-disp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek DISP_PWM Controller Device Tree Bindings
+
+maintainers:
+  - Jitao Shi <[email protected]>
+  - Xinlei Lee <[email protected]>
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - mediatek,mt2701-disp-pwm
+          - mediatek,mt6595-disp-pwm
+          - mediatek,mt8173-disp-pwm
+      - items:
+          - const: mediatek,mt8167-disp-pwm
+          - const: mediatek,mt8173-disp-pwm
+
+  reg:
+    maxItems: 1
+
+  "#pwm-cells":
+    const: 2
+
+  clocks:
+    items:
+      - description: Main Clock
+      - description: Mm Clock
+
+  clock-names:
+    items:
+      - const: main
+      - const: mm
+
+required:
+  - compatible
+  - reg
+  - "#pwm-cells"
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/mt8173-clk.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    pwm0: pwm@1401e000 {
+        compatible = "mediatek,mt8173-disp-pwm";
+        reg = <0x1401e000 0x1000>;
+        #pwm-cells = <2>;
+        clocks = <&mmsys CLK_MM_DISP_PWM026M>,
+                 <&mmsys CLK_MM_DISP_PWM0MM>;
+        clock-names = "main", "mm";
+    };
Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt deleted +0 -44

44 lines not on this page · raw message

Signature · 1 line
2.18.0
#2 lore raw

Re: [PATCH v4,1/6] dt-bindings: pwm: Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format

Quoted 17 lines

Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format as suggested by maintainer

---
 .../bindings/pwm/mediatek,pwm-disp.yaml       | 65 +++++++++++++++++++
 .../devicetree/bindings/pwm/pwm-mtk-disp.txt  | 44 -------------
 2 files changed, 65 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml new file +0 -0
new file mode 100644
index 000000000000..f844695d605a

Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml line 7

Quoted 7 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml new file +7 -0
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/mediatek,pwm-disp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek DISP_PWM Controller Device Tree Bindings

s/Mediatek/MediaTek/

Thanks,
Miles

Quoted 6 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml new file +6 -0
+
+maintainers:
+  - Jitao Shi <[email protected]>
+  - Xinlei Lee <[email protected]>
+
+allOf:
author
#3 lore raw

Re: [PATCH v4,1/6] dt-bindings: pwm: Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format

Quoted 33 lines · Miles Chen
Quoted 23 lines

Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format as suggested by maintainer

---
 .../bindings/pwm/mediatek,pwm-disp.yaml       | 65
+++++++++++++++++++
 .../devicetree/bindings/pwm/pwm-mtk-disp.txt  | 44 -------------
 2 files changed, 65 insertions(+), 44 deletions(-)
 create mode 100644
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-mtk-

disp.txt

(quoted diff) +0 -0

disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm- disp.yaml
new file mode 100644
index 000000000000..f844695d605a

Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml line 7

Quoted 7 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml new file +7 -0
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/mediatek,pwm-disp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek DISP_PWM Controller Device Tree Bindings

s/Mediatek/MediaTek/

Quoted 8 lines

Thanks,
Miles

Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml line 13

Quoted 6 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml new file +6 -0
+
+maintainers:
+  - Jitao Shi <[email protected]>
+  - Xinlei Lee <[email protected]>
+
+allOf:

Hi Miles:

Thanks for your suggestion.
I will fix it in the next version.

Best Regards!
xinlei
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#4 lore raw

PATCH v4 2/6 dt-bindings: pwm: Remove compatible for MediaTek MT8167

In reply to [email protected]

From: Xinlei Lee <[email protected]>

Remove dt-binding documentation of pwm for MediaTek MT8167 SoC. I did not find the compatiable corresponding to mt8167 in the latest version of the pwm-mtk-disp.c driver file. It may be disabled but not updated to the dt_binding file.

---
 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 ---
 1 file changed, 3 deletions(-)
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0 -3
index f844695d605a..f18e8bbd13d2 100644
@@ -20,9 +20,6 @@ properties:
           - mediatek,mt2701-disp-pwm
           - mediatek,mt6595-disp-pwm
           - mediatek,mt8173-disp-pwm
-      - items:
-          - const: mediatek,mt8167-disp-pwm
-          - const: mediatek,mt8173-disp-pwm
 
   reg:
     maxItems: 1
Signature · 1 line
2.18.0
#5 lore raw

Re: [PATCH v4,2/6] dt-bindings: pwm: Remove compatible for MediaTek MT8167

Hi Xinlei,

Quoted 15 lines

Remove dt-binding documentation of pwm for MediaTek MT8167 SoC. I did not find the compatiable corresponding to mt8167 in the latest version of the pwm-mtk-disp.c driver file. It may be disabled but not updated to the dt_binding file.

---
 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 ---
 1 file changed, 3 deletions(-)
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0 -0
index f844695d605a..f18e8bbd13d2 100644

Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml properties: · line 25

Quoted 6 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0 -3
@@ -20,9 +20,6 @@ properties:
           - mediatek,mt2701-disp-pwm
           - mediatek,mt6595-disp-pwm
           - mediatek,mt8173-disp-pwm
-      - items:
-          - const: mediatek,mt8167-disp-pwm
-          - const: mediatek,mt8173-disp-pwm

I checked:
grep -e 'mediatek,mt8167-disp-pwm' -e 'mediatek,mt8173-disp-pwm' drivers/ -RnH
drivers/gpu/drm/mediatek/mtk_drm_drv.c:486: { .compatible = "mediatek,mt8167-disp-pwm",
drivers/gpu/drm/mediatek/mtk_drm_drv.c:488: { .compatible = "mediatek,mt8173-disp-pwm",

mediatek,mt8167-disp-pwm and mediatek,mt8173-disp-pwm are used in drivers/gpu/drm/mediatek/mtk_drm_drv.c. (added by commit 58e4c5398200 ("drm/mediatek: Add support for main DDP path on MT8167"))

Is it ok to remove mediatek,mt8167-disp-pwm and mediatek,mt8173-disp-pwm?

Thanks,
Miles

Quoted 3 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0 -0
   reg:
     maxItems: 1
author
#6 lore raw

Re: [PATCH v4,2/6] dt-bindings: pwm: Remove compatible for MediaTek MT8167

Quoted 40 lines · Miles Chen

Hi Xinlei,

Quoted 18 lines

Remove dt-binding documentation of pwm for MediaTek MT8167 SoC. I did not find the compatiable corresponding to mt8167 in the latest version of the pwm-mtk-disp.c driver file. It may be disabled but not updated to the dt_binding file.

---
 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3
---
 1 file changed, 3 deletions(-)
(quoted diff) +0 -0

disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm- disp.yaml
index f844695d605a..f18e8bbd13d2 100644

Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml properties: · line 25

Quoted 6 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0 -3
@@ -20,9 +20,6 @@ properties:
           - mediatek,mt2701-disp-pwm
           - mediatek,mt6595-disp-pwm
           - mediatek,mt8173-disp-pwm
-      - items:
-          - const: mediatek,mt8167-disp-pwm
-          - const: mediatek,mt8173-disp-pwm

I checked:
grep -e 'mediatek,mt8167-disp-pwm' -e 'mediatek,mt8173-disp-pwm' drivers/ -RnH
drivers/gpu/drm/mediatek/mtk_drm_drv.c:486: { .compatible =
"mediatek,mt8167-disp-pwm",
drivers/gpu/drm/mediatek/mtk_drm_drv.c:488: { .compatible =
"mediatek,mt8173-disp-pwm",

mediatek,mt8167-disp-pwm and mediatek,mt8173-disp-pwm are used in drivers/gpu/drm/mediatek/mtk_drm_drv.c.
(added by commit 58e4c5398200 ("drm/mediatek: Add support for main DDP path on MT8167"))

Quoted 8 lines

Is it ok to remove mediatek,mt8167-disp-pwm and mediatek,mt8173-disp- pwm?

Thanks,
Miles

Quoted 3 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0 -0
   reg:
     maxItems: 1

hi Miles:

Thanks for your suggestion.
Maybe I misunderstood this mt8167 driver before. It is a reused mt8173 driver and not removed. I will remove this patch from this series in the next version.

Best Regards!
xinlei
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#7 lore raw

PATCH v4 3/6 dt-bindings: pwm: Add compatible for MediaTek MT8183

In reply to [email protected]

From: Xinlei Lee <[email protected]>

Add dt-binding documentation of pwm for MediaTek MT8183 SoC.

---
 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +1 -0
index f18e8bbd13d2..3a1ba329b7b3 100644
@@ -20,6 +20,7 @@ properties:
           - mediatek,mt2701-disp-pwm
           - mediatek,mt6595-disp-pwm
           - mediatek,mt8173-disp-pwm
+          - mediatek,mt8183-disp-pwm
 
   reg:
     maxItems: 1
Signature · 1 line
2.18.0
#8 lore raw

PATCH v4 4/6 dt-bindings: pwm: Add compatible for MediaTek MT8192

In reply to [email protected]

From: Xinlei Lee <[email protected]>

Add dt-binding documentation of pwm for MediaTek MT8192 SoC.

---
 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +4 -0
index 3a1ba329b7b3..2fcd734acaf6 100644
@@ -21,6 +21,10 @@ properties:
           - mediatek,mt6595-disp-pwm
           - mediatek,mt8173-disp-pwm
           - mediatek,mt8183-disp-pwm
+      - items:
+          - enum:
+              - mediatek,mt8192-disp-pwm
+          - const: mediatek,mt8183-disp-pwm
 
   reg:
     maxItems: 1
Signature · 1 line
2.18.0
#9 lore raw

PATCH v4 5/6 dt-bindings: pwm: Add compatible for MediaTek MT8195

In reply to [email protected]

From: Xinlei Lee <[email protected]>

Add dt-binding documentation of pwm for MediaTek MT8195 SoC.

---
 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +1 -0
index 2fcd734acaf6..a723819da559 100644
@@ -24,6 +24,7 @@ properties:
       - items:
           - enum:
               - mediatek,mt8192-disp-pwm
+              - mediatek,mt8195-disp-pwm
           - const: mediatek,mt8183-disp-pwm
 
   reg:
Signature · 1 line
2.18.0
#10 lore raw

PATCH v4 6/6 dt-bindings: pwm: Add compatible for MediaTek MT8186

In reply to [email protected]

From: Xinlei Lee <[email protected]>

Add dt-binding documentation of pwm for MediaTek MT8186 SoC.

---
 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +1 -0
index a723819da559..47e1cf3ca152 100644
@@ -23,6 +23,7 @@ properties:
           - mediatek,mt8183-disp-pwm
       - items:
           - enum:
+              - mediatek,mt8186-disp-pwm
               - mediatek,mt8192-disp-pwm
               - mediatek,mt8195-disp-pwm
           - const: mediatek,mt8183-disp-pwm
Signature · 1 line
2.18.0