[PATCH] dt-bindings: arm: mediatek: mediatek,g3dsys: Convert to DT schema

Udaya Kiran Challa posted 1 patch 3 weeks, 1 day ago
There is a newer version of this series
.../bindings/arm/mediatek/mediatek,g3dsys.txt | 30 ---------
.../arm/mediatek/mediatek,g3dsys.yaml         | 61 +++++++++++++++++++
2 files changed, 61 insertions(+), 30 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.yaml
[PATCH] dt-bindings: arm: mediatek: mediatek,g3dsys: Convert to DT schema
Posted by Udaya Kiran Challa 3 weeks, 1 day ago
Convert the MediaTek G3D system controller devicetree binding
from the legacy text format to DT schema.

Signed-off-by: Udaya Kiran Challa <challauday369@gmail.com>
---
 .../bindings/arm/mediatek/mediatek,g3dsys.txt | 30 ---------
 .../arm/mediatek/mediatek,g3dsys.yaml         | 61 +++++++++++++++++++
 2 files changed, 61 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.yaml

diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt
deleted file mode 100644
index 7de43bf41fdc..000000000000
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-MediaTek g3dsys controller
-============================
-
-The MediaTek g3dsys controller provides various clocks and reset controller to
-the GPU.
-
-Required Properties:
-
-- compatible: Should be:
-	- "mediatek,mt2701-g3dsys", "syscon":
-		for MT2701 SoC
-	- "mediatek,mt7623-g3dsys", "mediatek,mt2701-g3dsys", "syscon":
-		for MT7623 SoC
-- #clock-cells: Must be 1
-- #reset-cells: Must be 1
-
-The g3dsys controller uses the common clk binding from
-Documentation/devicetree/bindings/clock/clock-bindings.txt
-The available clocks are defined in dt-bindings/clock/mt*-clk.h.
-
-Example:
-
-g3dsys: clock-controller@13000000 {
-	compatible = "mediatek,mt7623-g3dsys",
-		     "mediatek,mt2701-g3dsys",
-		     "syscon";
-	reg = <0 0x13000000 0 0x200>;
-	#clock-cells = <1>;
-	#reset-cells = <1>;
-};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.yaml
new file mode 100644
index 000000000000..0bf672bd6e5c
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mediatek/mediatek,g3dsys.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek G3D System Controller
+
+maintainers:
+  - Sean Wang <sean.wang@mediatek.com>
+  - Ryder Lee <ryder.lee@mediatek.com>
+
+description: |
+  The MediaTek G3D system controller provides clocks and reset control
+  for the GPU subsystem on MediaTek SoCs.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: mediatek,mt2701-g3dsys
+          - const: syscon
+      - items:
+          - const: mediatek,mt7623-g3dsys
+          - const: mediatek,mt2701-g3dsys
+          - const: syscon
+
+  reg:
+    maxItems: 1
+    description: Base address and length of the G3DSYS register region
+
+  "#clock-cells":
+    const: 1
+    description: Number of cells in a clock specifier
+
+  "#reset-cells":
+    const: 1
+    description: Number of cells in a reset specifier
+
+required:
+  - compatible
+  - reg
+  - "#clock-cells"
+  - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+     soc {
+       #address-cells = <2>;
+       #size-cells = <2>;
+       g3dsys: syscon@13000000 {
+         compatible = "mediatek,mt7623-g3dsys",
+                      "mediatek,mt2701-g3dsys",
+                      "syscon";
+         reg = <0 0x13000000 0 0x200>;
+         #clock-cells = <1>;
+         #reset-cells = <1>;
+       };
+     };
-- 
2.34.1
Re: [PATCH] dt-bindings: arm: mediatek: mediatek,g3dsys: Convert to DT schema
Posted by Krzysztof Kozlowski 3 weeks, 1 day ago
On 15/03/2026 09:03, Udaya Kiran Challa wrote:
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - const: mediatek,mt2701-g3dsys
> +          - const: syscon
> +      - items:
> +          - const: mediatek,mt7623-g3dsys
> +          - const: mediatek,mt2701-g3dsys
> +          - const: syscon
> +
> +  reg:
> +    maxItems: 1
> +    description: Base address and length of the G3DSYS register region

Drop

> +
> +  "#clock-cells":
> +    const: 1
> +    description: Number of cells in a clock specifier

$ git grep "Number of cells in a clock specifier"

Read the guidelines for GSoC contributors I posted on IRC used in GSoC
and/or ones I wrote on social.kernel.org.

Your mentors were supposed to be Cc-ed here.

Best regards,
Krzysztof
Re: [PATCH] dt-bindings: arm: mediatek: mediatek,g3dsys: Convert to DT schema
Posted by Uday Kiran 2 weeks, 3 days ago
On Sun, Mar 15, 2026 at 7:55 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > +
> > +  "#clock-cells":
> > +    const: 1
> > +    description: Number of cells in a clock specifier
>
> $ git grep "Number of cells in a clock specifier"

Sorry Krzysztof, I didn't understand what you meant. I've tried executing
git grep, but there are no results apart from my commit. But, I've found it
in clock-binding.txt i.e., in clock.yaml in github. After careful study of
guidelines.I've removed the description of provider properties.
Please let me know if there is any deviation in my understanding!!

>
> Read the guidelines for GSoC contributors I posted on IRC used in GSoC
> and/or ones I wrote on social.kernel.org.

Thank you, I've gone through the guidelines once again and updated the
changes.

> Your mentors were supposed to be Cc-ed here.

I'm part of the Linux Kernel Spring Unpaid 2026 Mentorship program and
I've already Cc-ed Shuah in the mailing list.

Regards,
Udaya Kiran Challa
Re: [PATCH] dt-bindings: arm: mediatek: mediatek,g3dsys: Convert to DT schema
Posted by Krzysztof Kozlowski 2 weeks, 2 days ago
On 20/03/2026 19:00, Uday Kiran wrote:
> On Sun, Mar 15, 2026 at 7:55 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>> +
>>> +  "#clock-cells":
>>> +    const: 1
>>> +    description: Number of cells in a clock specifier
>>
>> $ git grep "Number of cells in a clock specifier"
> 
> Sorry Krzysztof, I didn't understand what you meant. I've tried executing
> git grep, but there are no results apart from my commit. But, I've found it

Exactly.

Therefore why would you write a style code which does not exist in the
kernel? Why doing this completely different than everyone else?

> in clock-binding.txt i.e., in clock.yaml in github. After careful study of
> guidelines.I've removed the description of provider properties.
> Please let me know if there is any deviation in my understanding!!
> 
>>
>> Read the guidelines for GSoC contributors I posted on IRC used in GSoC
>> and/or ones I wrote on social.kernel.org.
> 
> Thank you, I've gone through the guidelines once again and updated the
> changes.
> 
>> Your mentors were supposed to be Cc-ed here.
> 
> I'm part of the Linux Kernel Spring Unpaid 2026 Mentorship program and
> I've already Cc-ed Shuah in the mailing list.

Does that mean LFX mentorship also has sub-program like GSoC for
bindings conversion?  Does this program at least incorporated our
feedback from two years and year ago?



Best regards,
Krzysztof
Re: [PATCH] dt-bindings: arm: mediatek: mediatek,g3dsys: Convert to DT schema
Posted by Uday Kiran 2 weeks ago
On Sat, Mar 21, 2026 at 3:27 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 20/03/2026 19:00, Uday Kiran wrote:
> > On Sun, Mar 15, 2026 at 7:55 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >>> +
> >>> +  "#clock-cells":
> >>> +    const: 1
> >>> +    description: Number of cells in a clock specifier
> >>
> >> $ git grep "Number of cells in a clock specifier"
> >
> > Sorry Krzysztof, I didn't understand what you meant. I've tried executing
> > git grep, but there are no results apart from my commit. But, I've found it
>
> Exactly.
>
> Therefore why would you write a style code which does not exist in the
> kernel? Why doing this completely different than everyone else?

I understand now that it is redundant to add the description for provider
properties. I’ve removed the description and aligned the schema with
existing kernel style.

>
> > in clock-binding.txt i.e., in clock.yaml in github. After careful study of
> > guidelines.I've removed the description of provider properties.
> > Please let me know if there is any deviation in my understanding!!> >
> >> Your mentors were supposed to be Cc-ed here.
> >
> > I'm part of the Linux Kernel Spring Unpaid 2026 Mentorship program and
> > I've already Cc-ed Shuah in the mailing list.
>
> Does that mean LFX mentorship also has sub-program like GSoC for
> bindings conversion?  Does this program at least incorporated our
> feedback from two years and year ago?
>

It is similar in structure to GSoC, but it is not specific to bindings
conversion. We can contribute on any subsystem of kernel and I'm
trying to align my work with existing kernel conventions and feedback
from maintainers.

Regards,
Udaya Kiran Challa