Skip to content

panel-dt: switch sel6-8-gpio to low in unprepare

Dmitry Petrov requested to merge linux-5.15.29-guf-sel6-8-gpio into linux-5.15.29-guf

This MR is a fix for [YT-200] Kirkstone: Adapt standby behaviour of sel6_8 gpio.

By contrast with Rocko kernel, where a relatively simple fbdev driver is used, it was hard to determine in which part of DRM driver a routine which will toggle sel6_8 gpio line should be placed, plus it was not clear when VCC goes to zero.

  1. VCC part:

    • at first, we found that in Kirkstone kernel, VCC signal go to zero only when Weston is stopped, so echo 4 > /sys/class/graphics/fb0/blank is not enough;
    • after that we found that it is not necessary to stop weston for VCC to go to zero. It's enough to put Weston to "idle" state (see idle-time).
  2. Placement of routine to trigger sel6_8. There are two routines which are triggered during fb blanking or when Weston goes "idle"/"off": routines from vanilla pwm_bl driver or routines from panel-dt driver from SECO:

    • pwm_bl is triggered in following cases:
      • weston is switched to idle;
      • fb is blanking (no matter whether weston is "off", "on" or "idle")
    • panel-dt is triggered only in following two cases:
      • weston is "off" and fb is blanking;
      • weston is switched to "idle".

And as both places (pwm_bl and panel-dt) produces the same result, we decided to put triggering of sel6_8 to panel-dt, as its code much simpler.

  1. After we patched the panel-dt, we double checked voltages with voltmeter and got a following picture:
+-------------------------------+-----------+---------------+
|                               |  LCD_VCC  |  SEL6_8_GPIO  |
+-------------------------------+-----------+---------------+
| weston on,  echo 0 > blank    |  3.3V     |  3.3V         |
| weston on,  echo 4 > blank    |  3.3V     |  3.3V         |
|                               |           |               |
| weston off, echo 0 > blank    |  3.3V     |  3.3V         |
| weston off, echo 4 > blank    |  0V       |  0V           |
|                               |           |               |
| weston idle                   |  0V       |  0V           |
+-------------------------------+-----------+---------------+
Edited by Dmitry Petrov

Merge request reports