xref: /freebsd/sys/contrib/device-tree/Bindings/display/allwinner,sun6i-a31-drc.yaml (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2*c66ec88fSEmmanuel Vadot%YAML 1.2
3*c66ec88fSEmmanuel Vadot---
4*c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/display/allwinner,sun6i-a31-drc.yaml#
5*c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel Vadottitle: Allwinner A31 Dynamic Range Controller Device Tree Bindings
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel Vadotmaintainers:
10*c66ec88fSEmmanuel Vadot  - Chen-Yu Tsai <wens@csie.org>
11*c66ec88fSEmmanuel Vadot  - Maxime Ripard <mripard@kernel.org>
12*c66ec88fSEmmanuel Vadot
13*c66ec88fSEmmanuel Vadotdescription: |
14*c66ec88fSEmmanuel Vadot  The DRC (Dynamic Range Controller) allows to dynamically adjust
15*c66ec88fSEmmanuel Vadot  pixel brightness/contrast based on histogram measurements for LCD
16*c66ec88fSEmmanuel Vadot  content adaptive backlight control.
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel Vadotproperties:
19*c66ec88fSEmmanuel Vadot  compatible:
20*c66ec88fSEmmanuel Vadot    enum:
21*c66ec88fSEmmanuel Vadot      - allwinner,sun6i-a31-drc
22*c66ec88fSEmmanuel Vadot      - allwinner,sun6i-a31s-drc
23*c66ec88fSEmmanuel Vadot      - allwinner,sun8i-a23-drc
24*c66ec88fSEmmanuel Vadot      - allwinner,sun8i-a33-drc
25*c66ec88fSEmmanuel Vadot      - allwinner,sun9i-a80-drc
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel Vadot  reg:
28*c66ec88fSEmmanuel Vadot    maxItems: 1
29*c66ec88fSEmmanuel Vadot
30*c66ec88fSEmmanuel Vadot  interrupts:
31*c66ec88fSEmmanuel Vadot    maxItems: 1
32*c66ec88fSEmmanuel Vadot
33*c66ec88fSEmmanuel Vadot  clocks:
34*c66ec88fSEmmanuel Vadot    items:
35*c66ec88fSEmmanuel Vadot      - description: The DRC interface clock
36*c66ec88fSEmmanuel Vadot      - description: The DRC module clock
37*c66ec88fSEmmanuel Vadot      - description: The DRC DRAM clock
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel Vadot  clock-names:
40*c66ec88fSEmmanuel Vadot    items:
41*c66ec88fSEmmanuel Vadot      - const: ahb
42*c66ec88fSEmmanuel Vadot      - const: mod
43*c66ec88fSEmmanuel Vadot      - const: ram
44*c66ec88fSEmmanuel Vadot
45*c66ec88fSEmmanuel Vadot  resets:
46*c66ec88fSEmmanuel Vadot    maxItems: 1
47*c66ec88fSEmmanuel Vadot
48*c66ec88fSEmmanuel Vadot  ports:
49*c66ec88fSEmmanuel Vadot    type: object
50*c66ec88fSEmmanuel Vadot    description: |
51*c66ec88fSEmmanuel Vadot      A ports node with endpoint definitions as defined in
52*c66ec88fSEmmanuel Vadot      Documentation/devicetree/bindings/media/video-interfaces.txt.
53*c66ec88fSEmmanuel Vadot
54*c66ec88fSEmmanuel Vadot    properties:
55*c66ec88fSEmmanuel Vadot      "#address-cells":
56*c66ec88fSEmmanuel Vadot        const: 1
57*c66ec88fSEmmanuel Vadot
58*c66ec88fSEmmanuel Vadot      "#size-cells":
59*c66ec88fSEmmanuel Vadot        const: 0
60*c66ec88fSEmmanuel Vadot
61*c66ec88fSEmmanuel Vadot      port@0:
62*c66ec88fSEmmanuel Vadot        type: object
63*c66ec88fSEmmanuel Vadot        description: |
64*c66ec88fSEmmanuel Vadot          Input endpoints of the controller.
65*c66ec88fSEmmanuel Vadot
66*c66ec88fSEmmanuel Vadot      port@1:
67*c66ec88fSEmmanuel Vadot        type: object
68*c66ec88fSEmmanuel Vadot        description: |
69*c66ec88fSEmmanuel Vadot          Output endpoints of the controller.
70*c66ec88fSEmmanuel Vadot
71*c66ec88fSEmmanuel Vadot    required:
72*c66ec88fSEmmanuel Vadot      - "#address-cells"
73*c66ec88fSEmmanuel Vadot      - "#size-cells"
74*c66ec88fSEmmanuel Vadot      - port@0
75*c66ec88fSEmmanuel Vadot      - port@1
76*c66ec88fSEmmanuel Vadot
77*c66ec88fSEmmanuel Vadot    additionalProperties: false
78*c66ec88fSEmmanuel Vadot
79*c66ec88fSEmmanuel Vadotrequired:
80*c66ec88fSEmmanuel Vadot  - compatible
81*c66ec88fSEmmanuel Vadot  - reg
82*c66ec88fSEmmanuel Vadot  - interrupts
83*c66ec88fSEmmanuel Vadot  - clocks
84*c66ec88fSEmmanuel Vadot  - clock-names
85*c66ec88fSEmmanuel Vadot  - resets
86*c66ec88fSEmmanuel Vadot  - ports
87*c66ec88fSEmmanuel Vadot
88*c66ec88fSEmmanuel VadotadditionalProperties: false
89*c66ec88fSEmmanuel Vadot
90*c66ec88fSEmmanuel Vadotexamples:
91*c66ec88fSEmmanuel Vadot  - |
92*c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
93*c66ec88fSEmmanuel Vadot
94*c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/sun6i-a31-ccu.h>
95*c66ec88fSEmmanuel Vadot    #include <dt-bindings/reset/sun6i-a31-ccu.h>
96*c66ec88fSEmmanuel Vadot
97*c66ec88fSEmmanuel Vadot    drc0: drc@1e70000 {
98*c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun6i-a31-drc";
99*c66ec88fSEmmanuel Vadot        reg = <0x01e70000 0x10000>;
100*c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
101*c66ec88fSEmmanuel Vadot        clocks = <&ccu CLK_AHB1_DRC0>, <&ccu CLK_IEP_DRC0>,
102*c66ec88fSEmmanuel Vadot                 <&ccu CLK_DRAM_DRC0>;
103*c66ec88fSEmmanuel Vadot        clock-names = "ahb", "mod",
104*c66ec88fSEmmanuel Vadot                      "ram";
105*c66ec88fSEmmanuel Vadot        resets = <&ccu RST_AHB1_DRC0>;
106*c66ec88fSEmmanuel Vadot
107*c66ec88fSEmmanuel Vadot        ports {
108*c66ec88fSEmmanuel Vadot            #address-cells = <1>;
109*c66ec88fSEmmanuel Vadot            #size-cells = <0>;
110*c66ec88fSEmmanuel Vadot
111*c66ec88fSEmmanuel Vadot            drc0_in: port@0 {
112*c66ec88fSEmmanuel Vadot                reg = <0>;
113*c66ec88fSEmmanuel Vadot
114*c66ec88fSEmmanuel Vadot                drc0_in_be0: endpoint {
115*c66ec88fSEmmanuel Vadot                    remote-endpoint = <&be0_out_drc0>;
116*c66ec88fSEmmanuel Vadot                };
117*c66ec88fSEmmanuel Vadot            };
118*c66ec88fSEmmanuel Vadot
119*c66ec88fSEmmanuel Vadot            drc0_out: port@1 {
120*c66ec88fSEmmanuel Vadot                #address-cells = <1>;
121*c66ec88fSEmmanuel Vadot                #size-cells = <0>;
122*c66ec88fSEmmanuel Vadot                reg = <1>;
123*c66ec88fSEmmanuel Vadot
124*c66ec88fSEmmanuel Vadot                drc0_out_tcon0: endpoint@0 {
125*c66ec88fSEmmanuel Vadot                    reg = <0>;
126*c66ec88fSEmmanuel Vadot                    remote-endpoint = <&tcon0_in_drc0>;
127*c66ec88fSEmmanuel Vadot                };
128*c66ec88fSEmmanuel Vadot
129*c66ec88fSEmmanuel Vadot                drc0_out_tcon1: endpoint@1 {
130*c66ec88fSEmmanuel Vadot                    reg = <1>;
131*c66ec88fSEmmanuel Vadot                    remote-endpoint = <&tcon1_in_drc0>;
132*c66ec88fSEmmanuel Vadot                };
133*c66ec88fSEmmanuel Vadot            };
134*c66ec88fSEmmanuel Vadot        };
135*c66ec88fSEmmanuel Vadot    };
136*c66ec88fSEmmanuel Vadot
137*c66ec88fSEmmanuel Vadot
138*c66ec88fSEmmanuel Vadot...
139