Convert pwm-mtk-disp.txt to
Subsystems (3)
v3 cover Convert pwm-mtk-disp.txt to
From: Xinlei Lee <[email protected]>
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 | 72 +++++++++++++++++++ .../devicetree/bindings/pwm/pwm-mtk-disp.txt | 44 ------------ 2 files changed, 72 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
PATCH v3 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.
--- .../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
@@ -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
Re: [PATCH v3, 1/6] dt-bindings: pwm: Convert pwm-mtk-disp.txt to mediatek, pwm-disp.yaml format
Quoted 11 lines · On Wed, Mar 02, 2022 at 01:31:41PM +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format.
Signed-off-by Xinlei Lee <[email protected]>--- .../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
PATCH v3 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.
--- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 --- 1 file changed, 3 deletions(-)
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 reg: maxItems: 1
Signature · 1 line
2.18.0
Rob Herring
maintainerRe: [PATCH v3, 2/6] dt-bindings: pwm: Remove compatible for MediaTek MT8167
Quoted 3 lines · On Wed, Mar 02, 2022 at 01:31:42PM +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Remove dt-binding documentation of pwm for MediaTek MT8167 SoC.
Why?
Quoted 28 lines
Signed-off-by Xinlei Lee <[email protected]>--- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 --- 1 file changed, 3 deletions(-)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 reg: maxItems: 1Signature · 7 lines
2.18.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3, 2/6] dt-bindings: pwm: Remove compatible for MediaTek MT8167
Quoted 35 lines · Rob Herring
Quoted 3 lines · On Wed, Mar 02, 2022 at 01:31:42PM +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Remove dt-binding documentation of pwm for MediaTek MT8167 SoC.
Why?
Quoted 27 lines
Signed-off-by Xinlei Lee <[email protected]>--- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 --- 1 file changed, 3 deletions(-)(quoted diff) +0
-0
disp.yamlb/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
indexf844695d605a..f18e8bbd13d2100644Documentation/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 reg: maxItems: 1Signature · 1 line
2.18.0
Quoted 4 lines
Quoted 4 lines
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Rob:
Thanks for your review. Because I did not find the compatiable corresponding to mt8167 in the latest version of the pwm-mtk-disp.c driver file.
My understanding is that it may be disabled but not updated to the dt_binding file. If I have misunderstood, please let me know if this modification is still required.
Looking forward to your feedback.
Best Regards!
Thanks!
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
PATCH v3 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
@@ -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
Re: [PATCH v3,3/6] dt-bindings: pwm: Add compatible for MediaTek MT8183
Quoted 8 lines · On Wed, Mar 02, 2022 at 01:31:43PM +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of pwm for MediaTek MT8183 SoC.
Signed-off-by Xinlei Lee <[email protected]>--- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH v3 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, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +3 -1
@@ -21,7 +21,9 @@ properties: - mediatek,mt6595-disp-pwm - mediatek,mt8173-disp-pwm - mediatek,mt8183-disp-pwm - + - items: + - const: mediatek,mt8192-disp-pwm + - const: mediatek,mt8183-disp-pwm reg: maxItems: 1
Signature · 1 line
2.18.0
PATCH v3 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 | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +4 -0
@@ -24,6 +24,10 @@ properties: - items: - const: mediatek,mt8192-disp-pwm - const: mediatek,mt8183-disp-pwm + - items: + - const: mediatek,mt8195-disp-pwm + - const: mediatek,mt8183-disp-pwm + reg: maxItems: 1
Signature · 1 line
2.18.0
PATCH v3 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 | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +3 -0
@@ -21,6 +21,9 @@ properties: - mediatek,mt6595-disp-pwm - mediatek,mt8173-disp-pwm - mediatek,mt8183-disp-pwm + - items: + - const: mediatek,mt8186-disp-pwm + - const: mediatek,mt8183-disp-pwm - items: - const: mediatek,mt8192-disp-pwm - const: mediatek,mt8183-disp-pwm
Signature · 1 line
2.18.0
AngeloGioacchino Del Regno
maintainerRe: [PATCH v3,6/6] dt-bindings: pwm: Add compatible for MediaTek MT8186
Il 02/03/22 06:31, [email protected] ha scritto:
Quoted 15 lines
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>--- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0
-0
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml properties: · line 29
Quoted 9 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +3
-0@@ -21,6 +21,9 @@ properties: - mediatek,mt6595-disp-pwm - mediatek,mt8173-disp-pwm - mediatek,mt8183-disp-pwm + - items: + - const: mediatek,mt8186-disp-pwm + - const: mediatek,mt8183-disp-pwm - items: - const: mediatek,mt8192-disp-pwm - const: mediatek,mt8183-disp-pwm
Hello Xinlei,
even though repeating these items may not give you errors, this is not really the best way to do this.
I've done something similar here:
https://lore.kernel.org/linux-arm-kernel/[email protected]/
So, for the compatibles needing mediatek,mt8183-disp-pwm it should be looking similar to this:
- items:
- enum:
- mediatek,mt8186-disp-pwm
- mediatek,mt8192-disp-pwm
- mediatek,mt8195-disp-pwm
- const: mediatek,mt8183-disp-pwm
Regards,
Angelo
Re: [PATCH v3,6/6] dt-bindings: pwm: Add compatible for MediaTek MT8186
Quoted 32 lines · AngeloGioacchino Del Regno
Il 02/03/22 06:31, [email protected] ha scritto:
Quoted 18 lines
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>--- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 +++ 1 file changed, 3 insertions(+)(quoted diff) +0
-0
disp.yamlb/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
index3a5d1cfed94d..053805846cfe100644Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml properties: · line 29
Quoted 9 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +3
-0@@ -21,6 +21,9 @@ properties: - mediatek,mt6595-disp-pwm - mediatek,mt8173-disp-pwm - mediatek,mt8183-disp-pwm + - items: + - const: mediatek,mt8186-disp-pwm + - const: mediatek,mt8183-disp-pwm - items: - const: mediatek,mt8192-disp-pwm - const: mediatek,mt8183-disp-pwmHello Xinlei,
Quoted 5 lines
even though repeating these items may not give you errors, this is not really
the best way to do this.
I've done something similar here:
https://lore.kernel.org/linux-arm-kernel/[email protected]/
Quoted 12 lines
So, for the compatibles needing mediatek,mt8183-disp-pwm it should be looking
similar to this:- items:
- enum:
- mediatek,mt8186-disp-pwm
- mediatek,mt8192-disp-pwm
- mediatek,mt8195-disp-pwm
- const: mediatek,mt8183-disp-pwm
Quoted 2 lines
Regards,
Angelo
Hi Angelo:
Thanks for your review, it's a great suggestion. I will revise it as you suggested in the next commit.
Best Regards!
xinlei
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Rob Herring
maintainerRe: [PATCH v3,6/6] dt-bindings: pwm: Add compatible for MediaTek MT8186
In reply to [email protected]Quoted 14 lines · On Wed, Mar 02, 2022 at 01:31:46PM +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>--- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0
-0
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml properties: · line 26
Quoted 6 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +3
-0@@ -21,6 +21,9 @@ properties: - mediatek,mt6595-disp-pwm - mediatek,mt8173-disp-pwm - mediatek,mt8183-disp-pwm + - items: + - const: mediatek,mt8186-disp-pwm + - const: mediatek,mt8183-disp-pwm
Combine to 1 entry:
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml properties: · line 28
Quoted 2 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0
-0- items: - const: mediatek,mt8192-disp-pwm
enum:
- mediatek,mt8186-disp-pwm
- mediatek,mt8192-disp-pwm
Quoted 9 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0
-0- const: mediatek,mt8183-disp-pwmSignature · 7 lines
2.18.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3,6/6] dt-bindings: pwm: Add compatible for MediaTek MT8186
Quoted 28 lines · Rob Herring
Quoted 17 lines · On Wed, Mar 02, 2022 at 01:31:46PM +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>--- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 +++ 1 file changed, 3 insertions(+)(quoted diff) +0
-0
disp.yamlb/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
index3a5d1cfed94d..053805846cfe100644Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml properties: · line 26
Quoted 6 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +3
-0@@ -21,6 +21,9 @@ properties: - mediatek,mt6595-disp-pwm - mediatek,mt8173-disp-pwm - mediatek,mt8183-disp-pwm + - items: + - const: mediatek,mt8186-disp-pwm + - const: mediatek,mt8183-disp-pwmCombine to 1 entry:
Quoted 16 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml properties: · line 28
Quoted 2 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0
-0- items: - const: mediatek,mt8192-disp-pwmenum:
- mediatek,mt8186-disp-pwm
- mediatek,mt8192-disp-pwmQuoted 9 lines
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml +0
-0- const: mediatek,mt8183-disp-pwmSignature · 7 lines
2.18.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Rob:
Thanks for your review!
I will combine the reuse of the same driver into one entry in the next version.
Best Regards!
xinlei
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek