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