xref: /linux/Documentation/devicetree/bindings/display/panel/panel-edp.yaml (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
1*29145a56SDouglas Anderson# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*29145a56SDouglas Anderson%YAML 1.2
3*29145a56SDouglas Anderson---
4*29145a56SDouglas Anderson$id: http://devicetree.org/schemas/display/panel/panel-edp.yaml#
5*29145a56SDouglas Anderson$schema: http://devicetree.org/meta-schemas/core.yaml#
6*29145a56SDouglas Anderson
7*29145a56SDouglas Andersontitle: Probeable (via DP AUX / EDID) eDP Panels with simple poweron sequences
8*29145a56SDouglas Anderson
9*29145a56SDouglas Andersonmaintainers:
10*29145a56SDouglas Anderson  - Douglas Anderson <dianders@chromium.org>
11*29145a56SDouglas Anderson
12*29145a56SDouglas Andersondescription: |
13*29145a56SDouglas Anderson  This binding file can be used to indicate that an eDP panel is connected
14*29145a56SDouglas Anderson  to a Embedded DisplayPort AUX bus (see display/dp-aux-bus.yaml) without
15*29145a56SDouglas Anderson  actually specifying exactly what panel is connected. This is useful for
16*29145a56SDouglas Anderson  the case that more than one different panel could be connected to the
17*29145a56SDouglas Anderson  board, either for second-sourcing purposes or to support multiple SKUs
18*29145a56SDouglas Anderson  with different LCDs that hook up to a common board.
19*29145a56SDouglas Anderson
20*29145a56SDouglas Anderson  As per above, a requirement for using this binding is that the panel is
21*29145a56SDouglas Anderson  represented under the DP AUX bus. This means that we can use any
22*29145a56SDouglas Anderson  information provided by the DP AUX bus (including the EDID) to identify
23*29145a56SDouglas Anderson  the panel. We can use this to identify display size, resolution, and
24*29145a56SDouglas Anderson  timings among other things.
25*29145a56SDouglas Anderson
26*29145a56SDouglas Anderson  One piece of information about eDP panels that is typically _not_
27*29145a56SDouglas Anderson  provided anywhere on the DP AUX bus is the power sequencing timings.
28*29145a56SDouglas Anderson  This is the reason why, historically, we've always had to explicitly
29*29145a56SDouglas Anderson  list eDP panels. We solve that here with two tricks. The "worst case"
30*29145a56SDouglas Anderson  power on timings for any panels expected to be connected to a board are
31*29145a56SDouglas Anderson  specified in these bindings. Once we've powered on, it's expected that
32*29145a56SDouglas Anderson  the operating system will lookup the panel in a table (based on EDID
33*29145a56SDouglas Anderson  information) to figure out other power sequencing timings.
34*29145a56SDouglas Anderson
35*29145a56SDouglas Anderson  eDP panels in general can have somewhat arbitrary power sequencing
36*29145a56SDouglas Anderson  requirements. However, even though it's arbitrary in general, the
37*29145a56SDouglas Anderson  vast majority of panel datasheets have a power sequence diagram that
38*29145a56SDouglas Anderson  looks the exactly the same as every other panel. Each panel datasheet
39*29145a56SDouglas Anderson  cares about different timings in this diagram but the fact that the
40*29145a56SDouglas Anderson  diagram is so similar means we can come up with a single driver to
41*29145a56SDouglas Anderson  handle it.
42*29145a56SDouglas Anderson
43*29145a56SDouglas Anderson  These diagrams all look roughly like this, sometimes labeled with
44*29145a56SDouglas Anderson  slightly different numbers / lines but all pretty much the same
45*29145a56SDouglas Anderson  sequence. This is because much of this diagram comes straight from
46*29145a56SDouglas Anderson  the eDP Standard.
47*29145a56SDouglas Anderson
48*29145a56SDouglas Anderson                __________________________________________________
49*29145a56SDouglas Anderson  Vdd       ___/:                                                :\____       /
50*29145a56SDouglas Anderson          _/    :                                                :     \_____/
51*29145a56SDouglas Anderson           :<T1>:<T2>:                                 :<--T10-->:<T11>:<T12>:
52*29145a56SDouglas Anderson                :    +-----------------------+---------+---------+
53*29145a56SDouglas Anderson  eDP     -----------+ Black video           | Src vid | Blk vid +
54*29145a56SDouglas Anderson  Display       :    +-----------------------+---------+---------+
55*29145a56SDouglas Anderson                :     _______________________:_________:_________:
56*29145a56SDouglas Anderson  HPD           :<T3>|                       :         :         |
57*29145a56SDouglas Anderson          ___________|                       :         :         |_____________
58*29145a56SDouglas Anderson                     :                       :         :         :
59*29145a56SDouglas Anderson  Sink               +-----------------------:---------:---------+
60*29145a56SDouglas Anderson  AUX CH  -----------+ AUX Ch operational    :         :         +-------------
61*29145a56SDouglas Anderson                     +-----------------------:---------:---------+
62*29145a56SDouglas Anderson                     :                       :         :         :
63*29145a56SDouglas Anderson                     :<T4>:             :<T7>:         :         :
64*29145a56SDouglas Anderson  Src main                +------+------+--------------+---------+
65*29145a56SDouglas Anderson  lnk data----------------+LnkTrn| Idle |Valid vid data| Idle/off+-------------
66*29145a56SDouglas Anderson                          +------+------+--------------+---------+
67*29145a56SDouglas Anderson                          : <T5> :<-T6->:<-T8->:       :
68*29145a56SDouglas Anderson                                               :__:<T9>:
69*29145a56SDouglas Anderson  LED_EN                                       |  |
70*29145a56SDouglas Anderson          _____________________________________|  |____________________________
71*29145a56SDouglas Anderson                                               :  :
72*29145a56SDouglas Anderson                                     __________:__:_
73*29145a56SDouglas Anderson  PWM                               |          :  : |
74*29145a56SDouglas Anderson          __________________________|          :  : |__________________________
75*29145a56SDouglas Anderson                                    :          :  : :
76*29145a56SDouglas Anderson                       _____________:__________:__:_:______
77*29145a56SDouglas Anderson  Bklight         ____/:            :          :  : :     :\____
78*29145a56SDouglas Anderson  power   _______/     :<---T13---->:          :  : :<T16>:     \______________
79*29145a56SDouglas Anderson  (Vbl)          :<T17>:<---------T14--------->:  :<-T15->:<T18>:
80*29145a56SDouglas Anderson
81*29145a56SDouglas Anderson  The above looks fairly complex but, as per above, each panel only cares
82*29145a56SDouglas Anderson  about a subset of those timings.
83*29145a56SDouglas Anderson
84*29145a56SDouglas AndersonallOf:
85*29145a56SDouglas Anderson  - $ref: panel-common.yaml#
86*29145a56SDouglas Anderson
87*29145a56SDouglas Andersonproperties:
88*29145a56SDouglas Anderson  compatible:
89*29145a56SDouglas Anderson    const: edp-panel
90*29145a56SDouglas Anderson
91*29145a56SDouglas Anderson  hpd-reliable-delay-ms:
92*29145a56SDouglas Anderson    description:
93*29145a56SDouglas Anderson      A fixed amount of time that must be waited after powering on the
94*29145a56SDouglas Anderson      panel's power-supply before the HPD signal is a reliable way to know
95*29145a56SDouglas Anderson      when the AUX channel is ready. This is useful for panels that glitch
96*29145a56SDouglas Anderson      the HPD at the start of power-on. This value is not needed if HPD is
97*29145a56SDouglas Anderson      always reliable for all panels that might be connected.
98*29145a56SDouglas Anderson
99*29145a56SDouglas Anderson  hpd-absent-delay-ms:
100*29145a56SDouglas Anderson    description:
101*29145a56SDouglas Anderson      The panel specifies that HPD will be asserted this many milliseconds
102*29145a56SDouglas Anderson      from power on (timing T3 in the diagram above). If we have no way to
103*29145a56SDouglas Anderson      measure HPD then a fixed delay of this many milliseconds can be used.
104*29145a56SDouglas Anderson      This can also be used as a timeout when waiting for HPD. Does not
105*29145a56SDouglas Anderson      include the hpd-reliable-delay, so if hpd-reliable-delay was 80 ms
106*29145a56SDouglas Anderson      and hpd-absent-delay was 200 ms then we'd do a fixed 80 ms delay and
107*29145a56SDouglas Anderson      then we know HPD would assert in the next 120 ms. This value is not
108*29145a56SDouglas Anderson      needed if HPD hooked up, either through a GPIO in the panel node or
109*29145a56SDouglas Anderson      hooked up directly to the eDP controller.
110*29145a56SDouglas Anderson
111*29145a56SDouglas Anderson  backlight: true
112*29145a56SDouglas Anderson  enable-gpios: true
113*29145a56SDouglas Anderson  port: true
114*29145a56SDouglas Anderson  power-supply: true
115*29145a56SDouglas Anderson  no-hpd: true
116*29145a56SDouglas Anderson  hpd-gpios: true
117*29145a56SDouglas Anderson
118*29145a56SDouglas AndersonadditionalProperties: false
119*29145a56SDouglas Anderson
120*29145a56SDouglas Andersonrequired:
121*29145a56SDouglas Anderson  - compatible
122*29145a56SDouglas Anderson  - power-supply
123*29145a56SDouglas Anderson
124*29145a56SDouglas Andersonexamples:
125*29145a56SDouglas Anderson  - |
126*29145a56SDouglas Anderson    #include <dt-bindings/clock/qcom,rpmh.h>
127*29145a56SDouglas Anderson    #include <dt-bindings/gpio/gpio.h>
128*29145a56SDouglas Anderson    #include <dt-bindings/interrupt-controller/irq.h>
129*29145a56SDouglas Anderson
130*29145a56SDouglas Anderson    i2c {
131*29145a56SDouglas Anderson      #address-cells = <1>;
132*29145a56SDouglas Anderson      #size-cells = <0>;
133*29145a56SDouglas Anderson
134*29145a56SDouglas Anderson      bridge@2d {
135*29145a56SDouglas Anderson        compatible = "ti,sn65dsi86";
136*29145a56SDouglas Anderson        reg = <0x2d>;
137*29145a56SDouglas Anderson
138*29145a56SDouglas Anderson        interrupt-parent = <&tlmm>;
139*29145a56SDouglas Anderson        interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
140*29145a56SDouglas Anderson
141*29145a56SDouglas Anderson        enable-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
142*29145a56SDouglas Anderson
143*29145a56SDouglas Anderson        vpll-supply = <&src_pp1800_s4a>;
144*29145a56SDouglas Anderson        vccio-supply = <&src_pp1800_s4a>;
145*29145a56SDouglas Anderson        vcca-supply = <&src_pp1200_l2a>;
146*29145a56SDouglas Anderson        vcc-supply = <&src_pp1200_l2a>;
147*29145a56SDouglas Anderson
148*29145a56SDouglas Anderson        clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
149*29145a56SDouglas Anderson        clock-names = "refclk";
150*29145a56SDouglas Anderson
151*29145a56SDouglas Anderson        no-hpd;
152*29145a56SDouglas Anderson
153*29145a56SDouglas Anderson        ports {
154*29145a56SDouglas Anderson          #address-cells = <1>;
155*29145a56SDouglas Anderson          #size-cells = <0>;
156*29145a56SDouglas Anderson
157*29145a56SDouglas Anderson          port@0 {
158*29145a56SDouglas Anderson            reg = <0>;
159*29145a56SDouglas Anderson            endpoint {
160*29145a56SDouglas Anderson              remote-endpoint = <&dsi0_out>;
161*29145a56SDouglas Anderson            };
162*29145a56SDouglas Anderson          };
163*29145a56SDouglas Anderson
164*29145a56SDouglas Anderson          port@1 {
165*29145a56SDouglas Anderson            reg = <1>;
166*29145a56SDouglas Anderson            sn65dsi86_out: endpoint {
167*29145a56SDouglas Anderson              remote-endpoint = <&panel_in_edp>;
168*29145a56SDouglas Anderson            };
169*29145a56SDouglas Anderson          };
170*29145a56SDouglas Anderson        };
171*29145a56SDouglas Anderson
172*29145a56SDouglas Anderson        aux-bus {
173*29145a56SDouglas Anderson          panel {
174*29145a56SDouglas Anderson            compatible = "edp-panel";
175*29145a56SDouglas Anderson            power-supply = <&pp3300_dx_edp>;
176*29145a56SDouglas Anderson            backlight = <&backlight>;
177*29145a56SDouglas Anderson            hpd-gpios = <&sn65dsi86_bridge 2 GPIO_ACTIVE_HIGH>;
178*29145a56SDouglas Anderson            hpd-reliable-delay-ms = <15>;
179*29145a56SDouglas Anderson
180*29145a56SDouglas Anderson            port {
181*29145a56SDouglas Anderson              panel_in_edp: endpoint {
182*29145a56SDouglas Anderson                remote-endpoint = <&sn65dsi86_out>;
183*29145a56SDouglas Anderson              };
184*29145a56SDouglas Anderson            };
185*29145a56SDouglas Anderson          };
186*29145a56SDouglas Anderson        };
187*29145a56SDouglas Anderson      };
188*29145a56SDouglas Anderson    };
189