xref: /freebsd/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,padding.yaml (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
18d13bc63SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28d13bc63SEmmanuel Vadot%YAML 1.2
38d13bc63SEmmanuel Vadot---
48d13bc63SEmmanuel Vadot$id: http://devicetree.org/schemas/display/mediatek/mediatek,padding.yaml#
58d13bc63SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68d13bc63SEmmanuel Vadot
78d13bc63SEmmanuel Vadottitle: MediaTek Display Padding
88d13bc63SEmmanuel Vadot
98d13bc63SEmmanuel Vadotmaintainers:
108d13bc63SEmmanuel Vadot  - Chun-Kuang Hu <chunkuang.hu@kernel.org>
118d13bc63SEmmanuel Vadot  - Philipp Zabel <p.zabel@pengutronix.de>
128d13bc63SEmmanuel Vadot
138d13bc63SEmmanuel Vadotdescription:
148d13bc63SEmmanuel Vadot  Padding provides ability to add pixels to width and height of a layer with
158d13bc63SEmmanuel Vadot  specified colors. Due to hardware design, Mixer in VDOSYS1 requires
168d13bc63SEmmanuel Vadot  width of a layer to be 2-pixel-align, or 4-pixel-align when ETHDR is enabled,
178d13bc63SEmmanuel Vadot  we need Padding to deal with odd width.
188d13bc63SEmmanuel Vadot  Please notice that even if the Padding is in bypass mode, settings in
198d13bc63SEmmanuel Vadot  register must be cleared to 0, or undefined behaviors could happen.
208d13bc63SEmmanuel Vadot
218d13bc63SEmmanuel Vadotproperties:
228d13bc63SEmmanuel Vadot  compatible:
23*ae5de77eSEmmanuel Vadot    oneOf:
24*ae5de77eSEmmanuel Vadot      - enum:
258d13bc63SEmmanuel Vadot          - mediatek,mt8188-disp-padding
268d13bc63SEmmanuel Vadot          - mediatek,mt8195-mdp3-padding
27*ae5de77eSEmmanuel Vadot      - items:
28*ae5de77eSEmmanuel Vadot          - const: mediatek,mt8188-mdp3-padding
29*ae5de77eSEmmanuel Vadot          - const: mediatek,mt8195-mdp3-padding
308d13bc63SEmmanuel Vadot
318d13bc63SEmmanuel Vadot  reg:
328d13bc63SEmmanuel Vadot    maxItems: 1
338d13bc63SEmmanuel Vadot
348d13bc63SEmmanuel Vadot  power-domains:
358d13bc63SEmmanuel Vadot    maxItems: 1
368d13bc63SEmmanuel Vadot
378d13bc63SEmmanuel Vadot  clocks:
388d13bc63SEmmanuel Vadot    items:
398d13bc63SEmmanuel Vadot      - description: Padding's clocks
408d13bc63SEmmanuel Vadot
418d13bc63SEmmanuel Vadot  mediatek,gce-client-reg:
428d13bc63SEmmanuel Vadot    description:
438d13bc63SEmmanuel Vadot      GCE (Global Command Engine) is a multi-core micro processor that helps
448d13bc63SEmmanuel Vadot      its clients to execute commands without interrupting CPU. This property
458d13bc63SEmmanuel Vadot      describes GCE client's information that is composed by 4 fields.
468d13bc63SEmmanuel Vadot      1. Phandle of the GCE (there may be several GCE processors)
478d13bc63SEmmanuel Vadot      2. Sub-system ID defined in the dt-binding like a user ID
488d13bc63SEmmanuel Vadot         (Please refer to include/dt-bindings/gce/<chip>-gce.h)
498d13bc63SEmmanuel Vadot      3. Offset from base address of the subsys you are at
508d13bc63SEmmanuel Vadot      4. Size of the register the client needs
518d13bc63SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
528d13bc63SEmmanuel Vadot    items:
538d13bc63SEmmanuel Vadot      items:
548d13bc63SEmmanuel Vadot        - description: Phandle of the GCE
558d13bc63SEmmanuel Vadot        - description: Subsys ID defined in the dt-binding
568d13bc63SEmmanuel Vadot        - description: Offset from base address of the subsys
578d13bc63SEmmanuel Vadot        - description: Size of register
588d13bc63SEmmanuel Vadot    maxItems: 1
598d13bc63SEmmanuel Vadot
608d13bc63SEmmanuel Vadotrequired:
618d13bc63SEmmanuel Vadot  - compatible
628d13bc63SEmmanuel Vadot  - reg
638d13bc63SEmmanuel Vadot  - power-domains
648d13bc63SEmmanuel Vadot  - clocks
658d13bc63SEmmanuel Vadot  - mediatek,gce-client-reg
668d13bc63SEmmanuel Vadot
678d13bc63SEmmanuel VadotadditionalProperties: false
688d13bc63SEmmanuel Vadot
698d13bc63SEmmanuel Vadotexamples:
708d13bc63SEmmanuel Vadot  - |
718d13bc63SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
728d13bc63SEmmanuel Vadot    #include <dt-bindings/clock/mediatek,mt8188-clk.h>
738d13bc63SEmmanuel Vadot    #include <dt-bindings/power/mediatek,mt8188-power.h>
748d13bc63SEmmanuel Vadot    #include <dt-bindings/gce/mt8195-gce.h>
758d13bc63SEmmanuel Vadot
768d13bc63SEmmanuel Vadot    soc {
778d13bc63SEmmanuel Vadot        #address-cells = <2>;
788d13bc63SEmmanuel Vadot        #size-cells = <2>;
798d13bc63SEmmanuel Vadot
808d13bc63SEmmanuel Vadot        padding0: padding@1c11d000 {
818d13bc63SEmmanuel Vadot            compatible = "mediatek,mt8188-disp-padding";
828d13bc63SEmmanuel Vadot            reg = <0 0x1c11d000 0 0x1000>;
838d13bc63SEmmanuel Vadot            clocks = <&vdosys1 CLK_VDO1_PADDING0>;
848d13bc63SEmmanuel Vadot            power-domains = <&spm MT8188_POWER_DOMAIN_VDOSYS1>;
858d13bc63SEmmanuel Vadot            mediatek,gce-client-reg = <&gce0 SUBSYS_1c11XXXX 0xd000 0x1000>;
868d13bc63SEmmanuel Vadot        };
878d13bc63SEmmanuel Vadot    };
88