devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] drm+dt: multi panel selection and yoga c630 display
@ 2019-12-07 20:35 Rob Clark
  2019-12-07 20:35 ` [PATCH 1/4] dt-bindings: display: panel: document panel-id Rob Clark
  2019-12-07 20:35 ` [PATCH 4/4] arm64: dts: qcom: c630: Enable display Rob Clark
  0 siblings, 2 replies; 13+ messages in thread
From: Rob Clark @ 2019-12-07 20:35 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, aarch64-laptops
  Cc: Laurent Pinchart, Vasily Khoruzhick, Bjorn Andersson,
	Jeffrey Hugo, Rob Clark,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Jernej Skrabec, Jonas Karlman, open list, Sam Ravnborg

From: Rob Clark <robdclark@chromium.org>

It is not uncommon for devices to use one of several possible panels.
The Lenovo Yoga C630 laptop is one such device.  This patchset
introduces an optional "panel-id" property which can be used by the
firmware to find the correct panel node to enable.  The second patch
adds support in drm/of to automatically pick the enabled endpoint, to
avoid adding the same logic in multiple bridges/drivers.  The last
patch uses this mechanism to enable display support for the Yoga C630.

An example usage:

  boe_panel {
      compatible = "boe,nv133fhm-n61";
      panel-id = <0xc4>;
      /* fw will change status to "Ok" if this panel is installed */
      status = "disabled";

      ports {
          port {
              boe_panel_in_edp: endpoint {
                  remote-endpoint = <&sn65dsi86_out_boe>;
              };
          };
      };
  };

  ivo_panel {
      compatible = "ivo,m133nwf4-r0";
      panel-id = <0xc5>;
      /* fw will change status to "Ok" if this panel is installed */
      status = "disabled";

      ports {
          port {
              ivo_panel_in_edp: endpoint {
                  remote-endpoint = <&sn65dsi86_out_ivo>;
              };
          };
      };
  };

  sn65dsi86: bridge@2c {
      compatible = "ti,sn65dsi86";

      ports {
          #address-cells = <1>;
          #size-cells = <0>;

          port@0 {
              reg = <0>;
              sn65dsi86_in_a: endpoint {
                  remote-endpoint = <&dsi0_out>;
              };
          };

          port@1 {
              reg = <1>;

              sn65dsi86_out_boe: endpoint@c4 {
                  remote-endpoint = <&boe_panel_in_edp>;
              };

              sn65dsi86_out_ivo: endpoint@c5 {
                  remote-endpoint = <&ivo_panel_in_edp>;
              };
          };
      };
  };

This replaces an earlier proposal[1] to use chosen/panel-id to select the
installed panel, in favor of adding support[2] to an EFI driver module
(DtbLoader.efi) to find the installed panel, locate it in dtb via the
'panel-id' property, and update it's status to "Ok".

[1] https://patchwork.kernel.org/cover/11024613/
[2] https://github.com/robclark/edk2/commits/dtbloader

In this case, DtbLoader, which is somewhat generic (ie. this mechanism
applies to all snapdragon based devices which orignally ship with
windows), determines the panel-id of the installed panel from the
UEFIDisplayInfo variable.

As I understand, a similar situation exists with the pine64 laptops.  A
similar scheme could be used to support this, by loading the panel-id
from a u-boot variable.

In other cases (phones), a more device specific shim would be needed to
determine the panel-id by reading some GPIOs, or some other more device-
specific mechanism.

Bjorn Andersson (1):
  arm64: dts: qcom: c630: Enable display

Rob Clark (3):
  dt-bindings: display: panel: document panel-id
  drm/of: add support to find any enabled endpoint
  drm/bridge: ti-sn65dsi86: find any enabled endpoint

 .../bindings/display/panel/panel-common.yaml  |  26 +++
 .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 165 ++++++++++++++++++
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |   2 +-
 drivers/gpu/drm/drm_of.c                      |  41 ++++-
 4 files changed, 232 insertions(+), 2 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-12-09 15:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-07 20:35 [PATCH 0/4] drm+dt: multi panel selection and yoga c630 display Rob Clark
2019-12-07 20:35 ` [PATCH 1/4] dt-bindings: display: panel: document panel-id Rob Clark
2019-12-07 21:13   ` Sam Ravnborg
2019-12-07 21:34     ` Rob Clark
2019-12-08  9:39   ` Sam Ravnborg
2019-12-08 14:45   ` Laurent Pinchart
2019-12-08 16:50     ` Rob Clark
2019-12-08 18:27       ` Laurent Pinchart
2019-12-08 21:23         ` Rob Clark
2019-12-09 11:05           ` Laurent Pinchart
2019-12-09 15:31           ` Rob Herring
2019-12-09 15:57             ` Rob Clark
2019-12-07 20:35 ` [PATCH 4/4] arm64: dts: qcom: c630: Enable display Rob Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).