xref: /freebsd-src/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,padding.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1*8d13bc63SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8d13bc63SEmmanuel Vadot%YAML 1.2
3*8d13bc63SEmmanuel Vadot---
4*8d13bc63SEmmanuel Vadot$id: http://devicetree.org/schemas/display/mediatek/mediatek,padding.yaml#
5*8d13bc63SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8d13bc63SEmmanuel Vadot
7*8d13bc63SEmmanuel Vadottitle: MediaTek Display Padding
8*8d13bc63SEmmanuel Vadot
9*8d13bc63SEmmanuel Vadotmaintainers:
10*8d13bc63SEmmanuel Vadot  - Chun-Kuang Hu <chunkuang.hu@kernel.org>
11*8d13bc63SEmmanuel Vadot  - Philipp Zabel <p.zabel@pengutronix.de>
12*8d13bc63SEmmanuel Vadot
13*8d13bc63SEmmanuel Vadotdescription:
14*8d13bc63SEmmanuel Vadot  Padding provides ability to add pixels to width and height of a layer with
15*8d13bc63SEmmanuel Vadot  specified colors. Due to hardware design, Mixer in VDOSYS1 requires
16*8d13bc63SEmmanuel Vadot  width of a layer to be 2-pixel-align, or 4-pixel-align when ETHDR is enabled,
17*8d13bc63SEmmanuel Vadot  we need Padding to deal with odd width.
18*8d13bc63SEmmanuel Vadot  Please notice that even if the Padding is in bypass mode, settings in
19*8d13bc63SEmmanuel Vadot  register must be cleared to 0, or undefined behaviors could happen.
20*8d13bc63SEmmanuel Vadot
21*8d13bc63SEmmanuel Vadotproperties:
22*8d13bc63SEmmanuel Vadot  compatible:
23*8d13bc63SEmmanuel Vadot    enum:
24*8d13bc63SEmmanuel Vadot      - mediatek,mt8188-disp-padding
25*8d13bc63SEmmanuel Vadot      - mediatek,mt8195-mdp3-padding
26*8d13bc63SEmmanuel Vadot
27*8d13bc63SEmmanuel Vadot  reg:
28*8d13bc63SEmmanuel Vadot    maxItems: 1
29*8d13bc63SEmmanuel Vadot
30*8d13bc63SEmmanuel Vadot  power-domains:
31*8d13bc63SEmmanuel Vadot    maxItems: 1
32*8d13bc63SEmmanuel Vadot
33*8d13bc63SEmmanuel Vadot  clocks:
34*8d13bc63SEmmanuel Vadot    items:
35*8d13bc63SEmmanuel Vadot      - description: Padding's clocks
36*8d13bc63SEmmanuel Vadot
37*8d13bc63SEmmanuel Vadot  mediatek,gce-client-reg:
38*8d13bc63SEmmanuel Vadot    description:
39*8d13bc63SEmmanuel Vadot      GCE (Global Command Engine) is a multi-core micro processor that helps
40*8d13bc63SEmmanuel Vadot      its clients to execute commands without interrupting CPU. This property
41*8d13bc63SEmmanuel Vadot      describes GCE client's information that is composed by 4 fields.
42*8d13bc63SEmmanuel Vadot      1. Phandle of the GCE (there may be several GCE processors)
43*8d13bc63SEmmanuel Vadot      2. Sub-system ID defined in the dt-binding like a user ID
44*8d13bc63SEmmanuel Vadot         (Please refer to include/dt-bindings/gce/<chip>-gce.h)
45*8d13bc63SEmmanuel Vadot      3. Offset from base address of the subsys you are at
46*8d13bc63SEmmanuel Vadot      4. Size of the register the client needs
47*8d13bc63SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
48*8d13bc63SEmmanuel Vadot    items:
49*8d13bc63SEmmanuel Vadot      items:
50*8d13bc63SEmmanuel Vadot        - description: Phandle of the GCE
51*8d13bc63SEmmanuel Vadot        - description: Subsys ID defined in the dt-binding
52*8d13bc63SEmmanuel Vadot        - description: Offset from base address of the subsys
53*8d13bc63SEmmanuel Vadot        - description: Size of register
54*8d13bc63SEmmanuel Vadot    maxItems: 1
55*8d13bc63SEmmanuel Vadot
56*8d13bc63SEmmanuel Vadotrequired:
57*8d13bc63SEmmanuel Vadot  - compatible
58*8d13bc63SEmmanuel Vadot  - reg
59*8d13bc63SEmmanuel Vadot  - power-domains
60*8d13bc63SEmmanuel Vadot  - clocks
61*8d13bc63SEmmanuel Vadot  - mediatek,gce-client-reg
62*8d13bc63SEmmanuel Vadot
63*8d13bc63SEmmanuel VadotadditionalProperties: false
64*8d13bc63SEmmanuel Vadot
65*8d13bc63SEmmanuel Vadotexamples:
66*8d13bc63SEmmanuel Vadot  - |
67*8d13bc63SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
68*8d13bc63SEmmanuel Vadot    #include <dt-bindings/clock/mediatek,mt8188-clk.h>
69*8d13bc63SEmmanuel Vadot    #include <dt-bindings/power/mediatek,mt8188-power.h>
70*8d13bc63SEmmanuel Vadot    #include <dt-bindings/gce/mt8195-gce.h>
71*8d13bc63SEmmanuel Vadot
72*8d13bc63SEmmanuel Vadot    soc {
73*8d13bc63SEmmanuel Vadot        #address-cells = <2>;
74*8d13bc63SEmmanuel Vadot        #size-cells = <2>;
75*8d13bc63SEmmanuel Vadot
76*8d13bc63SEmmanuel Vadot        padding0: padding@1c11d000 {
77*8d13bc63SEmmanuel Vadot            compatible = "mediatek,mt8188-disp-padding";
78*8d13bc63SEmmanuel Vadot            reg = <0 0x1c11d000 0 0x1000>;
79*8d13bc63SEmmanuel Vadot            clocks = <&vdosys1 CLK_VDO1_PADDING0>;
80*8d13bc63SEmmanuel Vadot            power-domains = <&spm MT8188_POWER_DOMAIN_VDOSYS1>;
81*8d13bc63SEmmanuel Vadot            mediatek,gce-client-reg = <&gce0 SUBSYS_1c11XXXX 0xd000 0x1000>;
82*8d13bc63SEmmanuel Vadot        };
83*8d13bc63SEmmanuel Vadot    };
84