0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/display/panel/panel-edp.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Probeable (via DP AUX / EDID) eDP Panels with simple poweron sequences
0008
0009 maintainers:
0010 - Douglas Anderson <dianders@chromium.org>
0011
0012 description: |
0013 This binding file can be used to indicate that an eDP panel is connected
0014 to a Embedded DisplayPort AUX bus (see display/dp-aux-bus.yaml) without
0015 actually specifying exactly what panel is connected. This is useful for
0016 the case that more than one different panel could be connected to the
0017 board, either for second-sourcing purposes or to support multiple SKUs
0018 with different LCDs that hook up to a common board.
0019
0020 As per above, a requirement for using this binding is that the panel is
0021 represented under the DP AUX bus. This means that we can use any
0022 information provided by the DP AUX bus (including the EDID) to identify
0023 the panel. We can use this to identify display size, resolution, and
0024 timings among other things.
0025
0026 One piece of information about eDP panels that is typically _not_
0027 provided anywhere on the DP AUX bus is the power sequencing timings.
0028 This is the reason why, historically, we've always had to explicitly
0029 list eDP panels. We solve that here with two tricks. The "worst case"
0030 power on timings for any panels expected to be connected to a board are
0031 specified in these bindings. Once we've powered on, it's expected that
0032 the operating system will lookup the panel in a table (based on EDID
0033 information) to figure out other power sequencing timings.
0034
0035 eDP panels in general can have somewhat arbitrary power sequencing
0036 requirements. However, even though it's arbitrary in general, the
0037 vast majority of panel datasheets have a power sequence diagram that
0038 looks the exactly the same as every other panel. Each panel datasheet
0039 cares about different timings in this diagram but the fact that the
0040 diagram is so similar means we can come up with a single driver to
0041 handle it.
0042
0043 These diagrams all look roughly like this, sometimes labeled with
0044 slightly different numbers / lines but all pretty much the same
0045 sequence. This is because much of this diagram comes straight from
0046 the eDP Standard.
0047
0048 __________________________________________________
0049 Vdd ___/: :\____ /
0050 _/ : : \_____/
0051 :<T1>:<T2>: :<--T10-->:<T11>:<T12>:
0052 : +-----------------------+---------+---------+
0053 eDP -----------+ Black video | Src vid | Blk vid +
0054 Display : +-----------------------+---------+---------+
0055 : _______________________:_________:_________:
0056 HPD :<T3>| : : |
0057 ___________| : : |_____________
0058 : : : :
0059 Sink +-----------------------:---------:---------+
0060 AUX CH -----------+ AUX Ch operational : : +-------------
0061 +-----------------------:---------:---------+
0062 : : : :
0063 :<T4>: :<T7>: : :
0064 Src main +------+------+--------------+---------+
0065 lnk data----------------+LnkTrn| Idle |Valid vid data| Idle/off+-------------
0066 +------+------+--------------+---------+
0067 : <T5> :<-T6->:<-T8->: :
0068 :__:<T9>:
0069 LED_EN | |
0070 _____________________________________| |____________________________
0071 : :
0072 __________:__:_
0073 PWM | : : |
0074 __________________________| : : |__________________________
0075 : : : :
0076 _____________:__________:__:_:______
0077 Bklight ____/: : : : : :\____
0078 power _______/ :<---T13---->: : : :<T16>: \______________
0079 (Vbl) :<T17>:<---------T14--------->: :<-T15->:<T18>:
0080
0081 The above looks fairly complex but, as per above, each panel only cares
0082 about a subset of those timings.
0083
0084 allOf:
0085 - $ref: panel-common.yaml#
0086
0087 properties:
0088 compatible:
0089 const: edp-panel
0090
0091 hpd-reliable-delay-ms:
0092 description:
0093 A fixed amount of time that must be waited after powering on the
0094 panel's power-supply before the HPD signal is a reliable way to know
0095 when the AUX channel is ready. This is useful for panels that glitch
0096 the HPD at the start of power-on. This value is not needed if HPD is
0097 always reliable for all panels that might be connected.
0098
0099 hpd-absent-delay-ms:
0100 description:
0101 The panel specifies that HPD will be asserted this many milliseconds
0102 from power on (timing T3 in the diagram above). If we have no way to
0103 measure HPD then a fixed delay of this many milliseconds can be used.
0104 This can also be used as a timeout when waiting for HPD. Does not
0105 include the hpd-reliable-delay, so if hpd-reliable-delay was 80 ms
0106 and hpd-absent-delay was 200 ms then we'd do a fixed 80 ms delay and
0107 then we know HPD would assert in the next 120 ms. This value is not
0108 needed if HPD hooked up, either through a GPIO in the panel node or
0109 hooked up directly to the eDP controller.
0110
0111 backlight: true
0112 enable-gpios: true
0113 port: true
0114 power-supply: true
0115 no-hpd: true
0116 hpd-gpios: true
0117
0118 additionalProperties: false
0119
0120 required:
0121 - compatible
0122 - power-supply
0123
0124 examples:
0125 - |
0126 #include <dt-bindings/clock/qcom,rpmh.h>
0127 #include <dt-bindings/gpio/gpio.h>
0128 #include <dt-bindings/interrupt-controller/irq.h>
0129
0130 i2c {
0131 #address-cells = <1>;
0132 #size-cells = <0>;
0133
0134 bridge@2d {
0135 compatible = "ti,sn65dsi86";
0136 reg = <0x2d>;
0137
0138 interrupt-parent = <&tlmm>;
0139 interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
0140
0141 enable-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
0142
0143 vpll-supply = <&src_pp1800_s4a>;
0144 vccio-supply = <&src_pp1800_s4a>;
0145 vcca-supply = <&src_pp1200_l2a>;
0146 vcc-supply = <&src_pp1200_l2a>;
0147
0148 clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
0149 clock-names = "refclk";
0150
0151 no-hpd;
0152
0153 ports {
0154 #address-cells = <1>;
0155 #size-cells = <0>;
0156
0157 port@0 {
0158 reg = <0>;
0159 endpoint {
0160 remote-endpoint = <&dsi0_out>;
0161 };
0162 };
0163
0164 port@1 {
0165 reg = <1>;
0166 sn65dsi86_out: endpoint {
0167 remote-endpoint = <&panel_in_edp>;
0168 };
0169 };
0170 };
0171
0172 aux-bus {
0173 panel {
0174 compatible = "edp-panel";
0175 power-supply = <&pp3300_dx_edp>;
0176 backlight = <&backlight>;
0177 hpd-gpios = <&sn65dsi86_bridge 2 GPIO_ACTIVE_HIGH>;
0178 hpd-reliable-delay-ms = <15>;
0179
0180 port {
0181 panel_in_edp: endpoint {
0182 remote-endpoint = <&sn65dsi86_out>;
0183 };
0184 };
0185 };
0186 };
0187 };
0188 };