xref: /openbmc/linux/Documentation/devicetree/bindings/display/mediatek/mediatek,ethdr.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
1*64e352c9SNancy.Lin# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*64e352c9SNancy.Lin%YAML 1.2
3*64e352c9SNancy.Lin---
4*64e352c9SNancy.Lin$id: http://devicetree.org/schemas/display/mediatek/mediatek,ethdr.yaml#
5*64e352c9SNancy.Lin$schema: http://devicetree.org/meta-schemas/core.yaml#
6*64e352c9SNancy.Lin
7*64e352c9SNancy.Lintitle: MediaTek Ethdr Device
8*64e352c9SNancy.Lin
9*64e352c9SNancy.Linmaintainers:
10*64e352c9SNancy.Lin  - Chun-Kuang Hu <chunkuang.hu@kernel.org>
11*64e352c9SNancy.Lin  - Philipp Zabel <p.zabel@pengutronix.de>
12*64e352c9SNancy.Lin
13*64e352c9SNancy.Lindescription:
14*64e352c9SNancy.Lin  ETHDR (ET High Dynamic Range) is a MediaTek internal HDR engine and is
15*64e352c9SNancy.Lin  designed for HDR video and graphics conversion in the external display path.
16*64e352c9SNancy.Lin  It handles multiple HDR input types and performs tone mapping, color
17*64e352c9SNancy.Lin  space/color format conversion, and then combine different layers,
18*64e352c9SNancy.Lin  output the required HDR or SDR signal to the subsequent display path.
19*64e352c9SNancy.Lin  This engine is composed of two video frontends, two graphic frontends,
20*64e352c9SNancy.Lin  one video backend and a mixer. ETHDR has two DMA function blocks, DS and ADL.
21*64e352c9SNancy.Lin  These two function blocks read the pre-programmed registers from DRAM and
22*64e352c9SNancy.Lin  set them to HW in the v-blanking period.
23*64e352c9SNancy.Lin
24*64e352c9SNancy.Linproperties:
25*64e352c9SNancy.Lin  compatible:
26*64e352c9SNancy.Lin    const: mediatek,mt8195-disp-ethdr
27*64e352c9SNancy.Lin
28*64e352c9SNancy.Lin  reg:
29*64e352c9SNancy.Lin    maxItems: 7
30*64e352c9SNancy.Lin
31*64e352c9SNancy.Lin  reg-names:
32*64e352c9SNancy.Lin    items:
33*64e352c9SNancy.Lin      - const: mixer
34*64e352c9SNancy.Lin      - const: vdo_fe0
35*64e352c9SNancy.Lin      - const: vdo_fe1
36*64e352c9SNancy.Lin      - const: gfx_fe0
37*64e352c9SNancy.Lin      - const: gfx_fe1
38*64e352c9SNancy.Lin      - const: vdo_be
39*64e352c9SNancy.Lin      - const: adl_ds
40*64e352c9SNancy.Lin
41*64e352c9SNancy.Lin  interrupts:
42*64e352c9SNancy.Lin    maxItems: 1
43*64e352c9SNancy.Lin
44*64e352c9SNancy.Lin  iommus:
45*64e352c9SNancy.Lin    minItems: 1
46*64e352c9SNancy.Lin    maxItems: 2
47*64e352c9SNancy.Lin
48*64e352c9SNancy.Lin  clocks:
49*64e352c9SNancy.Lin    items:
50*64e352c9SNancy.Lin      - description: mixer clock
51*64e352c9SNancy.Lin      - description: video frontend 0 clock
52*64e352c9SNancy.Lin      - description: video frontend 1 clock
53*64e352c9SNancy.Lin      - description: graphic frontend 0 clock
54*64e352c9SNancy.Lin      - description: graphic frontend 1 clock
55*64e352c9SNancy.Lin      - description: video backend clock
56*64e352c9SNancy.Lin      - description: autodownload and menuload clock
57*64e352c9SNancy.Lin      - description: video frontend 0 async clock
58*64e352c9SNancy.Lin      - description: video frontend 1 async clock
59*64e352c9SNancy.Lin      - description: graphic frontend 0 async clock
60*64e352c9SNancy.Lin      - description: graphic frontend 1 async clock
61*64e352c9SNancy.Lin      - description: video backend async clock
62*64e352c9SNancy.Lin      - description: ethdr top clock
63*64e352c9SNancy.Lin
64*64e352c9SNancy.Lin  clock-names:
65*64e352c9SNancy.Lin    items:
66*64e352c9SNancy.Lin      - const: mixer
67*64e352c9SNancy.Lin      - const: vdo_fe0
68*64e352c9SNancy.Lin      - const: vdo_fe1
69*64e352c9SNancy.Lin      - const: gfx_fe0
70*64e352c9SNancy.Lin      - const: gfx_fe1
71*64e352c9SNancy.Lin      - const: vdo_be
72*64e352c9SNancy.Lin      - const: adl_ds
73*64e352c9SNancy.Lin      - const: vdo_fe0_async
74*64e352c9SNancy.Lin      - const: vdo_fe1_async
75*64e352c9SNancy.Lin      - const: gfx_fe0_async
76*64e352c9SNancy.Lin      - const: gfx_fe1_async
77*64e352c9SNancy.Lin      - const: vdo_be_async
78*64e352c9SNancy.Lin      - const: ethdr_top
79*64e352c9SNancy.Lin
80*64e352c9SNancy.Lin  power-domains:
81*64e352c9SNancy.Lin    maxItems: 1
82*64e352c9SNancy.Lin
83*64e352c9SNancy.Lin  resets:
84*64e352c9SNancy.Lin    items:
85*64e352c9SNancy.Lin      - description: video frontend 0 async reset
86*64e352c9SNancy.Lin      - description: video frontend 1 async reset
87*64e352c9SNancy.Lin      - description: graphic frontend 0 async reset
88*64e352c9SNancy.Lin      - description: graphic frontend 1 async reset
89*64e352c9SNancy.Lin      - description: video backend async reset
90*64e352c9SNancy.Lin
91*64e352c9SNancy.Lin  reset-names:
92*64e352c9SNancy.Lin    items:
93*64e352c9SNancy.Lin      - const: vdo_fe0_async
94*64e352c9SNancy.Lin      - const: vdo_fe1_async
95*64e352c9SNancy.Lin      - const: gfx_fe0_async
96*64e352c9SNancy.Lin      - const: gfx_fe1_async
97*64e352c9SNancy.Lin      - const: vdo_be_async
98*64e352c9SNancy.Lin
99*64e352c9SNancy.Lin  mediatek,gce-client-reg:
100*64e352c9SNancy.Lin    $ref: /schemas/types.yaml#/definitions/phandle-array
101*64e352c9SNancy.Lin    minItems: 1
102*64e352c9SNancy.Lin    maxItems: 7
103*64e352c9SNancy.Lin    description: The register of display function block to be set by gce.
104*64e352c9SNancy.Lin      There are 4 arguments in this property, gce node, subsys id, offset and
105*64e352c9SNancy.Lin      register size. The subsys id is defined in the gce header of each chips
106*64e352c9SNancy.Lin      include/dt-bindings/gce/<chip>-gce.h, mapping to the register of display
107*64e352c9SNancy.Lin      function block.
108*64e352c9SNancy.Lin
109*64e352c9SNancy.Linrequired:
110*64e352c9SNancy.Lin  - compatible
111*64e352c9SNancy.Lin  - reg
112*64e352c9SNancy.Lin  - clocks
113*64e352c9SNancy.Lin  - clock-names
114*64e352c9SNancy.Lin  - interrupts
115*64e352c9SNancy.Lin  - power-domains
116*64e352c9SNancy.Lin  - resets
117*64e352c9SNancy.Lin  - mediatek,gce-client-reg
118*64e352c9SNancy.Lin
119*64e352c9SNancy.LinadditionalProperties: false
120*64e352c9SNancy.Lin
121*64e352c9SNancy.Linexamples:
122*64e352c9SNancy.Lin  - |
123*64e352c9SNancy.Lin    #include <dt-bindings/interrupt-controller/arm-gic.h>
124*64e352c9SNancy.Lin    #include <dt-bindings/clock/mt8195-clk.h>
125*64e352c9SNancy.Lin    #include <dt-bindings/gce/mt8195-gce.h>
126*64e352c9SNancy.Lin    #include <dt-bindings/memory/mt8195-memory-port.h>
127*64e352c9SNancy.Lin    #include <dt-bindings/power/mt8195-power.h>
128*64e352c9SNancy.Lin    #include <dt-bindings/reset/mt8195-resets.h>
129*64e352c9SNancy.Lin
130*64e352c9SNancy.Lin    soc {
131*64e352c9SNancy.Lin        #address-cells = <2>;
132*64e352c9SNancy.Lin        #size-cells = <2>;
133*64e352c9SNancy.Lin
134*64e352c9SNancy.Lin        hdr-engine@1c114000 {
135*64e352c9SNancy.Lin                compatible = "mediatek,mt8195-disp-ethdr";
136*64e352c9SNancy.Lin                reg = <0 0x1c114000 0 0x1000>,
137*64e352c9SNancy.Lin                      <0 0x1c115000 0 0x1000>,
138*64e352c9SNancy.Lin                      <0 0x1c117000 0 0x1000>,
139*64e352c9SNancy.Lin                      <0 0x1c119000 0 0x1000>,
140*64e352c9SNancy.Lin                      <0 0x1c11a000 0 0x1000>,
141*64e352c9SNancy.Lin                      <0 0x1c11b000 0 0x1000>,
142*64e352c9SNancy.Lin                      <0 0x1c11c000 0 0x1000>;
143*64e352c9SNancy.Lin                reg-names = "mixer", "vdo_fe0", "vdo_fe1", "gfx_fe0", "gfx_fe1",
144*64e352c9SNancy.Lin                            "vdo_be", "adl_ds";
145*64e352c9SNancy.Lin                mediatek,gce-client-reg = <&gce0 SUBSYS_1c11XXXX 0x4000 0x1000>,
146*64e352c9SNancy.Lin                                          <&gce0 SUBSYS_1c11XXXX 0x5000 0x1000>,
147*64e352c9SNancy.Lin                                          <&gce0 SUBSYS_1c11XXXX 0x7000 0x1000>,
148*64e352c9SNancy.Lin                                          <&gce0 SUBSYS_1c11XXXX 0x9000 0x1000>,
149*64e352c9SNancy.Lin                                          <&gce0 SUBSYS_1c11XXXX 0xa000 0x1000>,
150*64e352c9SNancy.Lin                                          <&gce0 SUBSYS_1c11XXXX 0xb000 0x1000>,
151*64e352c9SNancy.Lin                                          <&gce0 SUBSYS_1c11XXXX 0xc000 0x1000>;
152*64e352c9SNancy.Lin                clocks = <&vdosys1 CLK_VDO1_DISP_MIXER>,
153*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_VDO_FE0>,
154*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_VDO_FE1>,
155*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_GFX_FE0>,
156*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_GFX_FE1>,
157*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_VDO_BE>,
158*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_26M_SLOW>,
159*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_VDO_FE0_DL_ASYNC>,
160*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_VDO_FE1_DL_ASYNC>,
161*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_GFX_FE0_DL_ASYNC>,
162*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_GFX_FE1_DL_ASYNC>,
163*64e352c9SNancy.Lin                         <&vdosys1 CLK_VDO1_HDR_VDO_BE_DL_ASYNC>,
164*64e352c9SNancy.Lin                         <&topckgen CLK_TOP_ETHDR>;
165*64e352c9SNancy.Lin                clock-names = "mixer", "vdo_fe0", "vdo_fe1", "gfx_fe0", "gfx_fe1",
166*64e352c9SNancy.Lin                              "vdo_be", "adl_ds", "vdo_fe0_async", "vdo_fe1_async",
167*64e352c9SNancy.Lin                              "gfx_fe0_async", "gfx_fe1_async","vdo_be_async",
168*64e352c9SNancy.Lin                              "ethdr_top";
169*64e352c9SNancy.Lin                power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
170*64e352c9SNancy.Lin                iommus = <&iommu_vpp M4U_PORT_L3_HDR_DS>,
171*64e352c9SNancy.Lin                         <&iommu_vpp M4U_PORT_L3_HDR_ADL>;
172*64e352c9SNancy.Lin                interrupts = <GIC_SPI 517 IRQ_TYPE_LEVEL_HIGH 0>; /* disp mixer */
173*64e352c9SNancy.Lin                resets = <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_VDO_FE0_DL_ASYNC>,
174*64e352c9SNancy.Lin                         <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_VDO_FE1_DL_ASYNC>,
175*64e352c9SNancy.Lin                         <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_GFX_FE0_DL_ASYNC>,
176*64e352c9SNancy.Lin                         <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_GFX_FE1_DL_ASYNC>,
177*64e352c9SNancy.Lin                         <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_VDO_BE_DL_ASYNC>;
178*64e352c9SNancy.Lin                reset-names = "vdo_fe0_async", "vdo_fe1_async", "gfx_fe0_async",
179*64e352c9SNancy.Lin                              "gfx_fe1_async", "vdo_be_async";
180*64e352c9SNancy.Lin        };
181*64e352c9SNancy.Lin    };
182*64e352c9SNancy.Lin...
183