Convert the existing text-based DT bindings for MediaTek MT8173 Media Data Path
to a YAML schema.
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
---
.../bindings/media/mediatek,mt8173-mdp.yaml | 174 ++++++++++++++++++
.../bindings/media/mediatek-mdp.txt | 95 ----------
2 files changed, 174 insertions(+), 95 deletions(-)
create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml
delete mode 100644 Documentation/devicetree/bindings/media/mediatek-mdp.txt
diff --git a/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml
new file mode 100644
index 0000000000000..f3a08afc305b1
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml
@@ -0,0 +1,174 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/mediatek,mt8173-mdp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT8173 Media Data Path
+
+maintainers:
+ - Ariel D'Alessandro <ariel.dalessandro@collabora.com>
+
+description:
+ Media Data Path is used for scaling and color space conversion.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - mediatek,mt8173-mdp-rdma
+ - mediatek,mt8173-mdp-rsz
+ - mediatek,mt8173-mdp-wdma
+ - mediatek,mt8173-mdp-wrot
+ - items:
+ - enum:
+ - mediatek,mt8173-mdp-rdma
+ - mediatek,mt8173-mdp-rsz
+ - mediatek,mt8173-mdp-wdma
+ - mediatek,mt8173-mdp-wrot
+ - const: mediatek,mt8173-mdp
+
+ reg:
+ maxItems: 1
+
+ clocks: true
+
+ power-domains:
+ maxItems: 1
+
+ iommus:
+ description: |
+ This property should point to the respective IOMMU block with master port as argument,
+ see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
+ maxItems: 1
+
+ mediatek,vpu:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Describes point to vpu.
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - power-domains
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8173-mdp-rdma
+ then:
+ properties:
+ clocks:
+ items:
+ - description: Main clock
+ - description: Mutex clock
+ else:
+ properties:
+ clocks:
+ items:
+ - description: Main clock
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - mediatek,mt8173-mdp-rdma
+ - mediatek,mt8173-mdp-wdma
+ - mediatek,mt8173-mdp-wrot
+ then:
+ required:
+ - iommus
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8173-mdp
+ then:
+ required:
+ - mediatek,vpu
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/mt8173-clk.h>
+ #include <dt-bindings/memory/mt8173-larb-port.h>
+ #include <dt-bindings/power/mt8173-power.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ mdp_rdma0: rdma@14001000 {
+ compatible = "mediatek,mt8173-mdp-rdma",
+ "mediatek,mt8173-mdp";
+ reg = <0 0x14001000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MDP_RDMA0>,
+ <&mmsys CLK_MM_MUTEX_32K>;
+ power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
+ iommus = <&iommu M4U_PORT_MDP_RDMA0>;
+ mediatek,vpu = <&vpu>;
+ };
+
+ mdp_rdma1: rdma@14002000 {
+ compatible = "mediatek,mt8173-mdp-rdma";
+ reg = <0 0x14002000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MDP_RDMA1>,
+ <&mmsys CLK_MM_MUTEX_32K>;
+ power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
+ iommus = <&iommu M4U_PORT_MDP_RDMA1>;
+ };
+
+ mdp_rsz0: rsz@14003000 {
+ compatible = "mediatek,mt8173-mdp-rsz";
+ reg = <0 0x14003000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MDP_RSZ0>;
+ power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
+ };
+
+ mdp_rsz1: rsz@14004000 {
+ compatible = "mediatek,mt8173-mdp-rsz";
+ reg = <0 0x14004000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MDP_RSZ1>;
+ power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
+ };
+
+ mdp_rsz2: rsz@14005000 {
+ compatible = "mediatek,mt8173-mdp-rsz";
+ reg = <0 0x14005000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MDP_RSZ2>;
+ power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
+ };
+
+ mdp_wdma0: wdma@14006000 {
+ compatible = "mediatek,mt8173-mdp-wdma";
+ reg = <0 0x14006000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MDP_WDMA>;
+ power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
+ iommus = <&iommu M4U_PORT_MDP_WDMA>;
+ };
+
+ mdp_wrot0: wrot@14007000 {
+ compatible = "mediatek,mt8173-mdp-wrot";
+ reg = <0 0x14007000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MDP_WROT0>;
+ power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
+ iommus = <&iommu M4U_PORT_MDP_WROT0>;
+ };
+
+ mdp_wrot1: wrot@14008000 {
+ compatible = "mediatek,mt8173-mdp-wrot";
+ reg = <0 0x14008000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MDP_WROT1>;
+ power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
+ iommus = <&iommu M4U_PORT_MDP_WROT1>;
+ };
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/media/mediatek-mdp.txt b/Documentation/devicetree/bindings/media/mediatek-mdp.txt
deleted file mode 100644
index 53ef26e2c8570..0000000000000
--- a/Documentation/devicetree/bindings/media/mediatek-mdp.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-* Mediatek Media Data Path
-
-Media Data Path is used for scaling and color space conversion.
-
-Required properties (controller node):
-- compatible: "mediatek,mt8173-mdp"
-- mediatek,vpu: the node of video processor unit, see
- Documentation/devicetree/bindings/media/mediatek-vpu.txt for details.
-
-Required properties (all function blocks, child node):
-- compatible: Should be one of
- "mediatek,mt8173-mdp-rdma" - read DMA
- "mediatek,mt8173-mdp-rsz" - resizer
- "mediatek,mt8173-mdp-wdma" - write DMA
- "mediatek,mt8173-mdp-wrot" - write DMA with rotation
-- reg: Physical base address and length of the function block register space
-- clocks: device clocks, see
- Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
-- power-domains: a phandle to the power domain, see
- Documentation/devicetree/bindings/power/power_domain.txt for details.
-
-Required properties (DMA function blocks, child node):
-- compatible: Should be one of
- "mediatek,mt8173-mdp-rdma"
- "mediatek,mt8173-mdp-wdma"
- "mediatek,mt8173-mdp-wrot"
-- iommus: should point to the respective IOMMU block with master port as
- argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
- for details.
-
-Example:
- mdp_rdma0: rdma@14001000 {
- compatible = "mediatek,mt8173-mdp-rdma";
- "mediatek,mt8173-mdp";
- reg = <0 0x14001000 0 0x1000>;
- clocks = <&mmsys CLK_MM_MDP_RDMA0>,
- <&mmsys CLK_MM_MUTEX_32K>;
- power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
- iommus = <&iommu M4U_PORT_MDP_RDMA0>;
- mediatek,vpu = <&vpu>;
- };
-
- mdp_rdma1: rdma@14002000 {
- compatible = "mediatek,mt8173-mdp-rdma";
- reg = <0 0x14002000 0 0x1000>;
- clocks = <&mmsys CLK_MM_MDP_RDMA1>,
- <&mmsys CLK_MM_MUTEX_32K>;
- power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
- iommus = <&iommu M4U_PORT_MDP_RDMA1>;
- };
-
- mdp_rsz0: rsz@14003000 {
- compatible = "mediatek,mt8173-mdp-rsz";
- reg = <0 0x14003000 0 0x1000>;
- clocks = <&mmsys CLK_MM_MDP_RSZ0>;
- power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
- };
-
- mdp_rsz1: rsz@14004000 {
- compatible = "mediatek,mt8173-mdp-rsz";
- reg = <0 0x14004000 0 0x1000>;
- clocks = <&mmsys CLK_MM_MDP_RSZ1>;
- power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
- };
-
- mdp_rsz2: rsz@14005000 {
- compatible = "mediatek,mt8173-mdp-rsz";
- reg = <0 0x14005000 0 0x1000>;
- clocks = <&mmsys CLK_MM_MDP_RSZ2>;
- power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
- };
-
- mdp_wdma0: wdma@14006000 {
- compatible = "mediatek,mt8173-mdp-wdma";
- reg = <0 0x14006000 0 0x1000>;
- clocks = <&mmsys CLK_MM_MDP_WDMA>;
- power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
- iommus = <&iommu M4U_PORT_MDP_WDMA>;
- };
-
- mdp_wrot0: wrot@14007000 {
- compatible = "mediatek,mt8173-mdp-wrot";
- reg = <0 0x14007000 0 0x1000>;
- clocks = <&mmsys CLK_MM_MDP_WROT0>;
- power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
- iommus = <&iommu M4U_PORT_MDP_WROT0>;
- };
-
- mdp_wrot1: wrot@14008000 {
- compatible = "mediatek,mt8173-mdp-wrot";
- reg = <0 0x14008000 0 0x1000>;
- clocks = <&mmsys CLK_MM_MDP_WROT1>;
- power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
- iommus = <&iommu M4U_PORT_MDP_WROT1>;
- };
--
2.50.1
On Wed, Aug 20, 2025 at 02:12:49PM -0300, Ariel D'Alessandro wrote: > Convert the existing text-based DT bindings for MediaTek MT8173 Media Data Path > to a YAML schema. Please wrap commit message according to Linux coding style / submission process (neither too early nor over the limit): https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597 > > Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com> > --- > .../bindings/media/mediatek,mt8173-mdp.yaml | 174 ++++++++++++++++++ > .../bindings/media/mediatek-mdp.txt | 95 ---------- > 2 files changed, 174 insertions(+), 95 deletions(-) > create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml > delete mode 100644 Documentation/devicetree/bindings/media/mediatek-mdp.txt > > diff --git a/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml > new file mode 100644 > index 0000000000000..f3a08afc305b1 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml > @@ -0,0 +1,174 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/mediatek,mt8173-mdp.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek MT8173 Media Data Path > + > +maintainers: > + - Ariel D'Alessandro <ariel.dalessandro@collabora.com> > + > +description: > + Media Data Path is used for scaling and color space conversion. > + > +properties: > + compatible: > + oneOf: > + - items: Just enum, no items here > + - enum: > + - mediatek,mt8173-mdp-rdma > + - mediatek,mt8173-mdp-rsz > + - mediatek,mt8173-mdp-wdma > + - mediatek,mt8173-mdp-wrot > + - items: > + - enum: > + - mediatek,mt8173-mdp-rdma > + - mediatek,mt8173-mdp-rsz > + - mediatek,mt8173-mdp-wdma > + - mediatek,mt8173-mdp-wrot > + - const: mediatek,mt8173-mdp This makes no sense. How devices can be compatible and can not be compatible. > + > + reg: > + maxItems: 1 > + > + clocks: true No, there's no such syntax. Look at other bindings. > + > + power-domains: > + maxItems: 1 > + > + iommus: > + description: | Drop | > + This property should point to the respective IOMMU block with master port as argument, > + see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details. Drop entire description, completely redundant. I don't know why my patch fixing this was not applied, so you keep repeating same mistakes... > + maxItems: 1 > + > + mediatek,vpu: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Describes point to vpu. Useless description. We see that from the property name. Explain the purpose in the hardware. > + > +required: > + - compatible > + - reg > + - clocks > + - power-domains > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: mediatek,mt8173-mdp-rdma > + then: > + properties: > + clocks: > + items: > + - description: Main clock > + - description: Mutex clock > + else: > + properties: > + clocks: > + items: > + - description: Main clock > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - mediatek,mt8173-mdp-rdma > + - mediatek,mt8173-mdp-wdma > + - mediatek,mt8173-mdp-wrot > + then: > + required: > + - iommus > + > + - if: > + properties: > + compatible: > + contains: > + const: mediatek,mt8173-mdp This makes no sense either. > + then: > + required: > + - mediatek,vpu > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/clock/mt8173-clk.h> > + #include <dt-bindings/memory/mt8173-larb-port.h> > + #include <dt-bindings/power/mt8173-power.h> > + > + soc { > + #address-cells = <2>; > + #size-cells = <2>; > + > + mdp_rdma0: rdma@14001000 { One example is enough. Two could be fine if they differ significantly. Best regards, Krzysztof
Krzysztof, On 8/21/25 3:46 AM, Krzysztof Kozlowski wrote: > On Wed, Aug 20, 2025 at 02:12:49PM -0300, Ariel D'Alessandro wrote: >> Convert the existing text-based DT bindings for MediaTek MT8173 Media Data Path >> to a YAML schema. > > Please wrap commit message according to Linux coding style / submission > process (neither too early nor over the limit): > https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597 Thanks. Looks like my editor was misconfigured, sorry. Will fix in v2. > >> >> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com> >> --- >> .../bindings/media/mediatek,mt8173-mdp.yaml | 174 ++++++++++++++++++ >> .../bindings/media/mediatek-mdp.txt | 95 ---------- >> 2 files changed, 174 insertions(+), 95 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml >> delete mode 100644 Documentation/devicetree/bindings/media/mediatek-mdp.txt >> >> diff --git a/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml >> new file mode 100644 >> index 0000000000000..f3a08afc305b1 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml >> @@ -0,0 +1,174 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/media/mediatek,mt8173-mdp.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: MediaTek MT8173 Media Data Path >> + >> +maintainers: >> + - Ariel D'Alessandro <ariel.dalessandro@collabora.com> >> + >> +description: >> + Media Data Path is used for scaling and color space conversion. >> + >> +properties: >> + compatible: >> + oneOf: >> + - items: > > Just enum, no items here See below. > > >> + - enum: >> + - mediatek,mt8173-mdp-rdma >> + - mediatek,mt8173-mdp-rsz >> + - mediatek,mt8173-mdp-wdma >> + - mediatek,mt8173-mdp-wrot >> + - items: >> + - enum: >> + - mediatek,mt8173-mdp-rdma >> + - mediatek,mt8173-mdp-rsz >> + - mediatek,mt8173-mdp-wdma >> + - mediatek,mt8173-mdp-wrot >> + - const: mediatek,mt8173-mdp > > This makes no sense. How devices can be compatible and can not be > compatible. According to the driver source code (and the previous txt mt8173-mdp bindings), there must be a "controller node" with compatible `mediatek,mt8173-mdp`. Then its sibling nodes (including itself) should be one of the component node ids, listed in `struct of_device_id mtk_mdp_comp_dt_ids[]`. Is there a proper/different way to describe this compatible binding in the yaml? Or you're saying the driver doesn't make sense here? [0] drivers/media/platform/mediatek/mdp/mtk_mdp_core.c > >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: true > > No, there's no such syntax. Look at other bindings. Ack. > > >> + >> + power-domains: >> + maxItems: 1 >> + >> + iommus: >> + description: | > > Drop | Ack. > >> + This property should point to the respective IOMMU block with master port as argument, >> + see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details. > > Drop entire description, completely redundant. I don't know why my patch > fixing this was not applied, so you keep repeating same mistakes... Ack. > >> + maxItems: 1 >> + >> + mediatek,vpu: >> + $ref: /schemas/types.yaml#/definitions/phandle >> + description: >> + Describes point to vpu. > > Useless description. We see that from the property name. Explain the > purpose in the hardware. Ack. > >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - power-domains >> + >> +allOf: >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: mediatek,mt8173-mdp-rdma >> + then: >> + properties: >> + clocks: >> + items: >> + - description: Main clock >> + - description: Mutex clock >> + else: >> + properties: >> + clocks: >> + items: >> + - description: Main clock >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - mediatek,mt8173-mdp-rdma >> + - mediatek,mt8173-mdp-wdma >> + - mediatek,mt8173-mdp-wrot >> + then: >> + required: >> + - iommus >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: mediatek,mt8173-mdp > > This makes no sense either. Same question above about compatibles. > >> + then: >> + required: >> + - mediatek,vpu >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/clock/mt8173-clk.h> >> + #include <dt-bindings/memory/mt8173-larb-port.h> >> + #include <dt-bindings/power/mt8173-power.h> >> + >> + soc { >> + #address-cells = <2>; >> + #size-cells = <2>; >> + >> + mdp_rdma0: rdma@14001000 { > > One example is enough. Two could be fine if they differ significantly. Sounds good. Will keep just a single example, including a node for the controller node and one for each of the components. Thanks a lot for the feedback! -- Ariel D'Alessandro Software Engineer Collabora Ltd. Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK Registered in England & Wales, no. 5513718
On 08/09/2025 19:52, Ariel D'Alessandro wrote: > Krzysztof, > > On 8/21/25 3:46 AM, Krzysztof Kozlowski wrote: >> On Wed, Aug 20, 2025 at 02:12:49PM -0300, Ariel D'Alessandro wrote: >>> Convert the existing text-based DT bindings for MediaTek MT8173 Media Data Path >>> to a YAML schema. >> >> Please wrap commit message according to Linux coding style / submission >> process (neither too early nor over the limit): >> https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597 > > Thanks. Looks like my editor was misconfigured, sorry. Will fix in v2. > >> >>> >>> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com> >>> --- >>> .../bindings/media/mediatek,mt8173-mdp.yaml | 174 ++++++++++++++++++ >>> .../bindings/media/mediatek-mdp.txt | 95 ---------- >>> 2 files changed, 174 insertions(+), 95 deletions(-) >>> create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml >>> delete mode 100644 Documentation/devicetree/bindings/media/mediatek-mdp.txt >>> >>> diff --git a/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml >>> new file mode 100644 >>> index 0000000000000..f3a08afc305b1 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml >>> @@ -0,0 +1,174 @@ >>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/media/mediatek,mt8173-mdp.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: MediaTek MT8173 Media Data Path >>> + >>> +maintainers: >>> + - Ariel D'Alessandro <ariel.dalessandro@collabora.com> >>> + >>> +description: >>> + Media Data Path is used for scaling and color space conversion. >>> + >>> +properties: >>> + compatible: >>> + oneOf: >>> + - items: >> >> Just enum, no items here > > See below. > >> >> >>> + - enum: >>> + - mediatek,mt8173-mdp-rdma >>> + - mediatek,mt8173-mdp-rsz >>> + - mediatek,mt8173-mdp-wdma >>> + - mediatek,mt8173-mdp-wrot >>> + - items: >>> + - enum: >>> + - mediatek,mt8173-mdp-rdma >>> + - mediatek,mt8173-mdp-rsz >>> + - mediatek,mt8173-mdp-wdma >>> + - mediatek,mt8173-mdp-wrot >>> + - const: mediatek,mt8173-mdp >> >> This makes no sense. How devices can be compatible and can not be >> compatible. > > According to the driver source code (and the previous txt mt8173-mdp > bindings), there must be a "controller node" with compatible > `mediatek,mt8173-mdp`. Then its sibling nodes (including itself) should But you did not define "mediatek,mt8173-mdp" here, so what are you talking about? I talk here about "wrot" and others, I thought it is obvious from the mistake in the schema. > be one of the component node ids, listed in `struct of_device_id > mtk_mdp_comp_dt_ids[]`. > > Is there a proper/different way to describe this compatible binding in > the yaml? Or you're saying the driver doesn't make sense here? > > [0] drivers/media/platform/mediatek/mdp/mtk_mdp_core.c > >> >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + clocks: true >> >> No, there's no such syntax. Look at other bindings. > > Ack. > >> >> >>> + >>> + power-domains: >>> + maxItems: 1 >>> + >>> + iommus: >>> + description: | >> >> Drop | > > Ack. > >> >>> + This property should point to the respective IOMMU block with master port as argument, >>> + see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details. >> >> Drop entire description, completely redundant. I don't know why my patch >> fixing this was not applied, so you keep repeating same mistakes... > > Ack. > >> >>> + maxItems: 1 >>> + >>> + mediatek,vpu: >>> + $ref: /schemas/types.yaml#/definitions/phandle >>> + description: >>> + Describes point to vpu. >> >> Useless description. We see that from the property name. Explain the >> purpose in the hardware. > > Ack. > >> >>> + >>> +required: >>> + - compatible >>> + - reg >>> + - clocks >>> + - power-domains >>> + >>> +allOf: >>> + - if: >>> + properties: >>> + compatible: >>> + contains: >>> + const: mediatek,mt8173-mdp-rdma >>> + then: >>> + properties: >>> + clocks: >>> + items: >>> + - description: Main clock >>> + - description: Mutex clock >>> + else: >>> + properties: >>> + clocks: >>> + items: >>> + - description: Main clock >>> + >>> + - if: >>> + properties: >>> + compatible: >>> + contains: >>> + enum: >>> + - mediatek,mt8173-mdp-rdma >>> + - mediatek,mt8173-mdp-wdma >>> + - mediatek,mt8173-mdp-wrot >>> + then: >>> + required: >>> + - iommus >>> + >>> + - if: >>> + properties: >>> + compatible: >>> + contains: >>> + const: mediatek,mt8173-mdp >> >> This makes no sense either. > > Same question above about compatibles. How same question? Do you understand this code? It is nothing the same - you have here contains! Best regards, Krzysztof
Krzysztof, On 9/9/25 3:32 AM, Krzysztof Kozlowski wrote: > On 08/09/2025 19:52, Ariel D'Alessandro wrote: >> Krzysztof, >> >> On 8/21/25 3:46 AM, Krzysztof Kozlowski wrote: >>> On Wed, Aug 20, 2025 at 02:12:49PM -0300, Ariel D'Alessandro wrote: [...] >>>> + - enum: >>>> + - mediatek,mt8173-mdp-rdma >>>> + - mediatek,mt8173-mdp-rsz >>>> + - mediatek,mt8173-mdp-wdma >>>> + - mediatek,mt8173-mdp-wrot >>>> + - items: >>>> + - enum: >>>> + - mediatek,mt8173-mdp-rdma >>>> + - mediatek,mt8173-mdp-rsz >>>> + - mediatek,mt8173-mdp-wdma >>>> + - mediatek,mt8173-mdp-wrot >>>> + - const: mediatek,mt8173-mdp >>> >>> This makes no sense. How devices can be compatible and can not be >>> compatible. >> >> According to the driver source code (and the previous txt mt8173-mdp >> bindings), there must be a "controller node" with compatible >> `mediatek,mt8173-mdp`. Then its sibling nodes (including itself) should > > But you did not define "mediatek,mt8173-mdp" here, so what are you > talking about? > > I talk here about "wrot" and others, I thought it is obvious from the > mistake in the schema. Ack. [...] >>>> + >>>> + - if: >>>> + properties: >>>> + compatible: >>>> + contains: >>>> + const: mediatek,mt8173-mdp >>> >>> This makes no sense either. >> >> Same question above about compatibles. > > How same question? Do you understand this code? It is nothing the same - > you have here contains! Ack. Will resubmit properly in v2. Thanks, -- Ariel D'Alessandro Software Engineer Collabora Ltd. Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK Registered in England & Wales, no. 5513718
© 2016 - 2025 Red Hat, Inc.