Linux-Devicetree Archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 00/11] drm: Fix EDID reading on ti-sn65dsi86 by introducing the DP AUX bus
@ 2021-05-25  0:01 Douglas Anderson
  2021-05-25  0:01 ` [PATCH v8 01/11] dt-bindings: display: simple: List hpd properties in panel-simple Douglas Anderson
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Douglas Anderson @ 2021-05-25  0:01 UTC (permalink / raw
  To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg
  Cc: linux-arm-msm, Linus W, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, robdclark, Maarten Lankhorst, Thierry Reding,
	dri-devel, Stanislav Lisovskiy, Stephen Boyd, Douglas Anderson,
	Andy Gross, Daniel Vetter, David Airlie, Jernej Skrabec,
	Laurent Pinchart, Maxime Ripard, Rob Herring, Robert Foss,
	Sandeep Panda, Thierry Reding, Thomas Zimmermann, devicetree,
	linux-kernel

The primary goal of this series is to try to properly fix EDID reading
for eDP panels using the ti-sn65dsi86 bridge.

Previously we had a patch that added EDID reading but it turned out
not to work at bootup. This caused some extra churn at bootup as we
tried (and failed) to read the EDID several times and also ended up
forcing us to use the hardcoded mode at boot. With this patch series I
believe EDID reading is reliable at boot now and we never use the
hardcoded mode.

High level note: in this series the EDID reading is driven by the
panel driver, not by the bridge chip driver. I believe this makes a
reasonable amount of sense since the panel driver already _could_
drive reading the EDID if provided with the DDC bus and in future
planned work we'll want to give the panel driver the DDC bus (to make
decisions based on EDID) and the AUX bus (to control the
backlight). There are also planned patches from Laurent to make
ti-sn65dsi86 able to drive full DP monitors. In that case the bridge
chip will still be in charge of reading the EDID, but it's not hard to
make this dynamic.

This series is the logical successor to the 3-part series containing
the patch ("drm/bridge: ti-sn65dsi86: Properly get the EDID, but only
if refclk") [1].

This patch was tested against drm-misc-next commit a596fcd9cbc7
("drm/panel: panel-simple: Add missing
pm_runtime_dont_use_autosuspend() calls") on a sc7180-trogdor-lazor
device.

At v8 now, the bindings patches have been beefed up from v7 and
review/ack tags were added. Also allmodconfig was fixed.

Between v2 and v3, high-level view of changes:
- stop doing the EDID caching in the core.

Between v3 and v4, high-level view of changes:
- EDID reading is actually driven by the panel driver now. See above.
- Lots of chicken-and-egg problems solved w/ sub-devices.

Between v4 and v5, high-level view of changes.
- Some of the early patches landed, so dropped from series.
- New pm_runtime_disable() fix (fixed a patch that already landed).
- Added Bjorn's tags to most patches
- Fixed problems when building as a module.
- Reordered debugfs patch and fixed error handling there.
- Dropped last patch. I'm not convinced it's safe w/out more work.

Between v5 and v6, high-level view of changes:
- Added the patch ("drm/dp: Allow an early call to register DDC i2c
  bus")
- Many patches had been landed, so only a few "controversial" ones
  left.

Between v6 and v7, high-level view of changes:
- New AUX DP bus!

Between v7 and v8, high-level view of changes:
- More bindings work.
- Fixed allmodconfig.

[1] https://lore.kernel.org/r/20210304155144.3.I60a7fb23ce4589006bc95c64ab8d15c74b876e68@changeid/

Changes in v8:
- Allow dp-aux-bus to be a module to fix allmodconfig builds
- Explain better why HPD needs to be in panel-simple in commit msg.
- Separate DP AUX bus binding is new for v8.
- ti-sn65dsi86 references the new aux bus bindings.

Changes in v7:
- Adjusted commit message to talk about DP AUX bus.
- Beefed up commit message in context of the DP AUX bus.
- List hpd properties bindings patch new for v7.
- Panel now under bridge chip instead of getting a link to ddc-i2c
- Patch introducing the DP AUX bus is new for v7.
- Patch to allow panel-simple to be DP AUX EP new for v7.
- Patch to support for DP AUX bus on ti-sn65dsi86 new for v7.
- Patch using the DP AUX for DDC new for v7.
- Remove use of now-dropped drm_dp_aux_register_ddc() call.
- Set the proper sub-device "dev" pointer in the AUX structure.
- ti-sn65dsi86: Add aux-bus child patch new for v7.

Changes in v6:
- Use new drm_dp_aux_register_ddc() calls.

Douglas Anderson (11):
  dt-bindings: display: simple: List hpd properties in panel-simple
  dt-bindings: drm: Introduce the DP AUX bus
  dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child
  dt-bindings: drm/aux-bus: Add an example
  drm: Introduce the DP AUX bus
  drm/panel: panel-simple: Allow panel-simple be a DP AUX endpoint
    device
  drm/panel: panel-simple: Stash DP AUX bus; allow using it for DDC
  drm/bridge: ti-sn65dsi86: Promote the AUX channel to its own sub-dev
  drm/bridge: ti-sn65dsi86: Add support for the DP AUX bus
  drm/bridge: ti-sn65dsi86: Don't read EDID blob over DDC
  arm64: dts: qcom: sc7180-trogdor: Move panel under the bridge chip

 .../bindings/display/bridge/ti,sn65dsi86.yaml |  20 +-
 .../bindings/display/dp-aux-bus.yaml          | 102 ++++++
 .../bindings/display/panel/panel-simple.yaml  |   2 +
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi  |  30 +-
 drivers/gpu/drm/Kconfig                       |   5 +
 drivers/gpu/drm/Makefile                      |   2 +
 drivers/gpu/drm/bridge/Kconfig                |   1 +
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         | 111 ++++--
 drivers/gpu/drm/drm_dp_aux_bus.c              | 326 ++++++++++++++++++
 drivers/gpu/drm/panel/Kconfig                 |   1 +
 drivers/gpu/drm/panel/panel-simple.c          |  64 +++-
 include/drm/drm_dp_aux_bus.h                  |  57 +++
 12 files changed, 665 insertions(+), 56 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/dp-aux-bus.yaml
 create mode 100644 drivers/gpu/drm/drm_dp_aux_bus.c
 create mode 100644 include/drm/drm_dp_aux_bus.h

-- 
2.31.1.818.g46aad6cb9e-goog


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

* [PATCH v8 01/11] dt-bindings: display: simple: List hpd properties in panel-simple
  2021-05-25  0:01 [PATCH v8 00/11] drm: Fix EDID reading on ti-sn65dsi86 by introducing the DP AUX bus Douglas Anderson
@ 2021-05-25  0:01 ` Douglas Anderson
  2021-06-02 18:00   ` Rob Herring
  2021-05-25  0:01 ` [PATCH v8 02/11] dt-bindings: drm: Introduce the DP AUX bus Douglas Anderson
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Douglas Anderson @ 2021-05-25  0:01 UTC (permalink / raw
  To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg
  Cc: linux-arm-msm, Linus W, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, robdclark, Maarten Lankhorst, Thierry Reding,
	dri-devel, Stanislav Lisovskiy, Stephen Boyd, Douglas Anderson,
	Daniel Vetter, David Airlie, Rob Herring, Thierry Reding,
	devicetree, linux-kernel

The HPD (Hot Plug Detect) signal is present in many (probably even
"most") eDP panels. For eDP, this signal isn't actually used for
detecting hot-plugs of the panel but is more akin to a "panel ready"
signal. After you provide power to the panel, panel timing diagrams
typically say that you should wait for HPD to be asserted (or wait a
fixed amount of time) before talking to the panel.

The panel-simple bindings describes many eDP panels and many of these
panels provide the HPD signal. We should add the HPD-related
properties to the panel-simple bindings. The HPD properties are
actually defined in panel-common.yaml, so adding them here just
documents that they are OK for panels handled by the panel-simple
bindings.

NOTE: whether or not we'd include HPD properties in the panel node is
more a property of the board design than the panel itself. For most
boards using these eDP panels everything "magically" works without
specifying any HPD properties and that's been why we haven't needed to
allow the HPD properties earlier. On these boards the HPD signal goes
directly to a dedicated "HPD" input to the eDP controller and this
connection doesn't need to be described in the device tree. The only
time the HPD properties are needed in the device tree are if HPD is
hooked up to a GPIO or if HPD is normally on the panel but isn't used
on a given board. That means that if we don't allow the HPD properties
in panel-simple then one could argue that we've got to boot all eDP
panels (or at least all those that someone could conceivably put on a
system where HPD goes to a GPIO or isn't hooked up) from panel-simple.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v8:
- Explain better why HPD needs to be in panel-simple in commit msg.

Changes in v7:
- List hpd properties bindings patch new for v7.

 .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
index b3797ba2698b..4a0a5e1ee252 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
@@ -298,6 +298,8 @@ properties:
   enable-gpios: true
   port: true
   power-supply: true
+  no-hpd: true
+  hpd-gpios: true
 
 additionalProperties: false
 
-- 
2.31.1.818.g46aad6cb9e-goog


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

* [PATCH v8 02/11] dt-bindings: drm: Introduce the DP AUX bus
  2021-05-25  0:01 [PATCH v8 00/11] drm: Fix EDID reading on ti-sn65dsi86 by introducing the DP AUX bus Douglas Anderson
  2021-05-25  0:01 ` [PATCH v8 01/11] dt-bindings: display: simple: List hpd properties in panel-simple Douglas Anderson
@ 2021-05-25  0:01 ` Douglas Anderson
  2021-06-02 18:08   ` Rob Herring
  2021-05-25  0:01 ` [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child Douglas Anderson
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Douglas Anderson @ 2021-05-25  0:01 UTC (permalink / raw
  To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg
  Cc: linux-arm-msm, Linus W, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, robdclark, Maarten Lankhorst, Thierry Reding,
	dri-devel, Stanislav Lisovskiy, Stephen Boyd, Douglas Anderson,
	Daniel Vetter, David Airlie, Rob Herring, devicetree,
	linux-kernel

We want to be able to list an eDP panel as a child of an eDP
controller node to represent the fact that the panel is connected to
the controller's DP AUX bus. Though the panel and the controller are
connected in several ways, the DP AUX bus is the primary control
interface between the two and thus makes the most sense to model in
device tree hierarchy.

Listing a panel in this way makes it possible for the panel driver to
easily get access to the DP AUX bus that it resides on, which can be
useful to help in auto-detecting the panel and for turning on various
bits.

NOTE: historically eDP panels were _not_ listed under their controller
but were listed at the top level of the device tree. This will still
be supported for backward compatibility (and while DP controller
drivers are adapted to support the new DT syntax) but should be
considered deprecated since there is no downside to listing the panel
under the controller.

For now, the DP AUX bus bindings will only support an eDP panel
underneath. It's possible it could be extended to allow having a DP
connector under it in the future.

The idea for this bus's design was hashed out over IRC [1].

[1] https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&date=2021-05-11

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
My DT yaml-fu is still weak. If I did something stupid, please help me
learn how to do this better!

NOTE: there is no "Example" in this bindings file. Yikes! This is
because I wanted to keep this patch separate from the one that enables
the first eDP controller. See the patch ("dt-bindings: drm/aux-bus:
Add an example") for the example.

ALSO: if anyone else would like to be listed as a "Maintainer" in this
file then please shout!

Changes in v8:
- Separate DP AUX bus binding is new for v8.

 .../bindings/display/dp-aux-bus.yaml          | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/dp-aux-bus.yaml

diff --git a/Documentation/devicetree/bindings/display/dp-aux-bus.yaml b/Documentation/devicetree/bindings/display/dp-aux-bus.yaml
new file mode 100644
index 000000000000..5e4afe9f98fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/dp-aux-bus.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/dp-aux-bus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: DisplayPort AUX bus
+
+maintainers:
+  - Douglas Anderson <dianders@chromium.org>
+
+description:
+  DisplayPort controllers provide a control channel to the sinks that
+  are hooked up to them. This is the DP AUX bus. Over the DP AUX bus
+  we can query properties about a sink and also configure it. In
+  particular, DP sinks support DDC over DP AUX which allows tunneling
+  a standard I2C DDC connection over the AUX channel.
+
+  To model this relationship, DP sinks should be placed as children
+  of the DP controller under the "aux-bus" node.
+
+  At the moment, this binding only handles the eDP case. It is
+  possible it will be extended in the future to handle the DP case.
+  For DP, presumably a connector would be listed under the DP AUX
+  bus instead of a panel.
+
+properties:
+  $nodename:
+    const: "aux-bus"
+
+  panel:
+    $ref: panel/panel-common.yaml#
+
+additionalProperties: false
+
+required:
+  - panel
-- 
2.31.1.818.g46aad6cb9e-goog


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

* [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child
  2021-05-25  0:01 [PATCH v8 00/11] drm: Fix EDID reading on ti-sn65dsi86 by introducing the DP AUX bus Douglas Anderson
  2021-05-25  0:01 ` [PATCH v8 01/11] dt-bindings: display: simple: List hpd properties in panel-simple Douglas Anderson
  2021-05-25  0:01 ` [PATCH v8 02/11] dt-bindings: drm: Introduce the DP AUX bus Douglas Anderson
@ 2021-05-25  0:01 ` Douglas Anderson
  2021-05-28  0:29   ` Linus Walleij
  2021-06-02 18:10   ` Rob Herring
  2021-05-25  0:01 ` [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example Douglas Anderson
  2021-05-25  0:01 ` [PATCH v8 11/11] arm64: dts: qcom: sc7180-trogdor: Move panel under the bridge chip Douglas Anderson
  4 siblings, 2 replies; 15+ messages in thread
From: Douglas Anderson @ 2021-05-25  0:01 UTC (permalink / raw
  To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg
  Cc: linux-arm-msm, Linus W, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, robdclark, Maarten Lankhorst, Thierry Reding,
	dri-devel, Stanislav Lisovskiy, Stephen Boyd, Douglas Anderson,
	Daniel Vetter, David Airlie, Laurent Pinchart, Rob Herring,
	Sandeep Panda, devicetree, linux-kernel

The patch ("dt-bindings: drm: Introduce the DP AUX bus") talks about
how using the DP AUX bus is better than learning how to slice
bread. Let's add it to the ti-sn65dsi86 bindings.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v8:
- ti-sn65dsi86 references the new aux bus bindings.

Changes in v7:
- ti-sn65dsi86: Add aux-bus child patch new for v7.

 .../bindings/display/bridge/ti,sn65dsi86.yaml | 20 ++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml b/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml
index 26932d2e86ab..4007f36d04ba 100644
--- a/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml
+++ b/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml
@@ -70,6 +70,9 @@ properties:
     const: 1
     description: See ../../pwm/pwm.yaml for description of the cell formats.
 
+  aux-bus:
+    $ref: ../dp-aux-bus.yaml#
+
   ports:
     $ref: /schemas/graph.yaml#/properties/ports
 
@@ -201,11 +204,26 @@ examples:
 
           port@1 {
             reg = <1>;
-            endpoint {
+            sn65dsi86_out: endpoint {
               remote-endpoint = <&panel_in_edp>;
             };
           };
         };
+
+        aux-bus {
+          panel {
+            compatible = "boe,nv133fhm-n62";
+            power-supply = <&pp3300_dx_edp>;
+            backlight = <&backlight>;
+            hpd-gpios = <&sn65dsi86_bridge 2 GPIO_ACTIVE_HIGH>;
+
+            port {
+              panel_in_edp: endpoint {
+                remote-endpoint = <&sn65dsi86_out>;
+              };
+            };
+          };
+        };
       };
     };
   - |
-- 
2.31.1.818.g46aad6cb9e-goog


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

* [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example
  2021-05-25  0:01 [PATCH v8 00/11] drm: Fix EDID reading on ti-sn65dsi86 by introducing the DP AUX bus Douglas Anderson
                   ` (2 preceding siblings ...)
  2021-05-25  0:01 ` [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child Douglas Anderson
@ 2021-05-25  0:01 ` Douglas Anderson
  2021-05-28  0:31   ` Linus Walleij
  2021-06-02 18:16   ` Rob Herring
  2021-05-25  0:01 ` [PATCH v8 11/11] arm64: dts: qcom: sc7180-trogdor: Move panel under the bridge chip Douglas Anderson
  4 siblings, 2 replies; 15+ messages in thread
From: Douglas Anderson @ 2021-05-25  0:01 UTC (permalink / raw
  To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg
  Cc: linux-arm-msm, Linus W, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, robdclark, Maarten Lankhorst, Thierry Reding,
	dri-devel, Stanislav Lisovskiy, Stephen Boyd, Douglas Anderson,
	Daniel Vetter, David Airlie, Rob Herring, devicetree,
	linux-kernel

Now that we have an eDP controller that lists aux-bus, we can safely
add an example to the aux-bus bindings.

NOTE: this example is just a copy of the one in the 'ti-sn65dsi86'
one. It feels useful to have the example in both places simply because
it's important to document the interaction between the two bindings in
both places.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v8:
- Separate DP AUX bus binding is new for v8.

 .../bindings/display/dp-aux-bus.yaml          | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/dp-aux-bus.yaml b/Documentation/devicetree/bindings/display/dp-aux-bus.yaml
index 5e4afe9f98fb..43494d2a32a1 100644
--- a/Documentation/devicetree/bindings/display/dp-aux-bus.yaml
+++ b/Documentation/devicetree/bindings/display/dp-aux-bus.yaml
@@ -35,3 +35,68 @@ additionalProperties: false
 
 required:
   - panel
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      bridge@2d {
+        compatible = "ti,sn65dsi86";
+        reg = <0x2d>;
+
+        interrupt-parent = <&tlmm>;
+        interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
+
+        enable-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
+
+        vpll-supply = <&src_pp1800_s4a>;
+        vccio-supply = <&src_pp1800_s4a>;
+        vcca-supply = <&src_pp1200_l2a>;
+        vcc-supply = <&src_pp1200_l2a>;
+
+        clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
+        clock-names = "refclk";
+
+        no-hpd;
+
+        ports {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          port@0 {
+            reg = <0>;
+            endpoint {
+              remote-endpoint = <&dsi0_out>;
+            };
+          };
+
+          port@1 {
+            reg = <1>;
+            sn65dsi86_out: endpoint {
+              remote-endpoint = <&panel_in_edp>;
+            };
+          };
+        };
+
+        aux-bus {
+          panel {
+            compatible = "boe,nv133fhm-n62";
+            power-supply = <&pp3300_dx_edp>;
+            backlight = <&backlight>;
+            hpd-gpios = <&sn65dsi86_bridge 2 GPIO_ACTIVE_HIGH>;
+
+            port {
+              panel_in_edp: endpoint {
+                remote-endpoint = <&sn65dsi86_out>;
+              };
+            };
+          };
+        };
+      };
+    };
-- 
2.31.1.818.g46aad6cb9e-goog


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

* [PATCH v8 11/11] arm64: dts: qcom: sc7180-trogdor: Move panel under the bridge chip
  2021-05-25  0:01 [PATCH v8 00/11] drm: Fix EDID reading on ti-sn65dsi86 by introducing the DP AUX bus Douglas Anderson
                   ` (3 preceding siblings ...)
  2021-05-25  0:01 ` [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example Douglas Anderson
@ 2021-05-25  0:01 ` Douglas Anderson
  4 siblings, 0 replies; 15+ messages in thread
From: Douglas Anderson @ 2021-05-25  0:01 UTC (permalink / raw
  To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg
  Cc: linux-arm-msm, Linus W, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, robdclark, Maarten Lankhorst, Thierry Reding,
	dri-devel, Stanislav Lisovskiy, Stephen Boyd, Douglas Anderson,
	Andy Gross, Rob Herring, devicetree, linux-kernel

Putting the panel under the bridge chip (under the aux-bus node)
allows the panel driver to get access to the DP AUX bus, enabling all
sorts of fabulous new features.

While we're at this, get rid of a level of hierarchy for the panel
node. It doesn't need "ports / port" and can just have a "port" child.

For Linux, this patch has a hard requirement on the patches adding DP
AUX bus support to the ti-sn65dsi86 bridge chip driver. See the patch
("drm/bridge: ti-sn65dsi86: Add support for the DP AUX bus").

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---

(no changes since v7)

Changes in v7:
- Panel now under bridge chip instead of getting a link to ddc-i2c

 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 30 ++++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index 24d293ef56d7..c76afd857b54 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -260,21 +260,6 @@ max98357a: audio-codec-0 {
 		#sound-dai-cells = <0>;
 	};
 
-	panel: panel {
-		/* Compatible will be filled in per-board */
-		power-supply = <&pp3300_dx_edp>;
-		backlight = <&backlight>;
-		hpd-gpios = <&sn65dsi86_bridge 2 GPIO_ACTIVE_HIGH>;
-
-		ports {
-			port {
-				panel_in_edp: endpoint {
-					remote-endpoint = <&sn65dsi86_out>;
-				};
-			};
-		};
-	};
-
 	pwmleds {
 		compatible = "pwm-leds";
 		keyboard_backlight: keyboard-backlight {
@@ -674,6 +659,21 @@ sn65dsi86_out: endpoint {
 				};
 			};
 		};
+
+		aux-bus {
+			panel: panel {
+				/* Compatible will be filled in per-board */
+				power-supply = <&pp3300_dx_edp>;
+				backlight = <&backlight>;
+				hpd-gpios = <&sn65dsi86_bridge 2 GPIO_ACTIVE_HIGH>;
+
+				port {
+					panel_in_edp: endpoint {
+						remote-endpoint = <&sn65dsi86_out>;
+					};
+				};
+			};
+		};
 	};
 };
 
-- 
2.31.1.818.g46aad6cb9e-goog


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

* Re: [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child
  2021-05-25  0:01 ` [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child Douglas Anderson
@ 2021-05-28  0:29   ` Linus Walleij
  2021-06-02 18:06     ` Rob Herring
  2021-06-02 18:10   ` Rob Herring
  1 sibling, 1 reply; 15+ messages in thread
From: Linus Walleij @ 2021-05-28  0:29 UTC (permalink / raw
  To: Douglas Anderson
  Cc: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg, MSM, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, Rob Clark, Maarten Lankhorst, Thierry Reding,
	open list:DRM PANEL DRIVERS, Stanislav Lisovskiy, Stephen Boyd,
	Daniel Vetter, David Airlie, Rob Herring, Sandeep Panda,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

On Tue, May 25, 2021 at 2:02 AM Douglas Anderson <dianders@chromium.org> wrote:

> The patch ("dt-bindings: drm: Introduce the DP AUX bus") talks about
> how using the DP AUX bus is better than learning how to slice
> bread. Let's add it to the ti-sn65dsi86 bindings.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
(...)
>      description: See ../../pwm/pwm.yaml for description of the cell formats.>

Just use the full path:
/schemas/pwm/pwm.yaml

> +  aux-bus:
> +    $ref: ../dp-aux-bus.yaml#

Use the full path. (Same method as above)

This removes the need for ../../... ....

You do it here:

>    ports:
>      $ref: /schemas/graph.yaml#/properties/ports

Other than that I think it looks all right!

Yours,
Linus Walleij

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

* Re: [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example
  2021-05-25  0:01 ` [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example Douglas Anderson
@ 2021-05-28  0:31   ` Linus Walleij
  2021-06-02 18:16   ` Rob Herring
  1 sibling, 0 replies; 15+ messages in thread
From: Linus Walleij @ 2021-05-28  0:31 UTC (permalink / raw
  To: Douglas Anderson
  Cc: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg, MSM, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, Rob Clark, Maarten Lankhorst, Thierry Reding,
	open list:DRM PANEL DRIVERS, Stanislav Lisovskiy, Stephen Boyd,
	Daniel Vetter, David Airlie, Rob Herring,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

On Tue, May 25, 2021 at 2:02 AM Douglas Anderson <dianders@chromium.org> wrote:

> Now that we have an eDP controller that lists aux-bus, we can safely
> add an example to the aux-bus bindings.
>
> NOTE: this example is just a copy of the one in the 'ti-sn65dsi86'
> one. It feels useful to have the example in both places simply because
> it's important to document the interaction between the two bindings in
> both places.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Looks good.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v8 01/11] dt-bindings: display: simple: List hpd properties in panel-simple
  2021-05-25  0:01 ` [PATCH v8 01/11] dt-bindings: display: simple: List hpd properties in panel-simple Douglas Anderson
@ 2021-06-02 18:00   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2021-06-02 18:00 UTC (permalink / raw
  To: Douglas Anderson
  Cc: Stanislav Lisovskiy, David Airlie, Thierry Reding, robdclark,
	Andrzej Hajda, Maarten Lankhorst, dri-devel, devicetree,
	Rob Herring, linux-kernel, Laurent Pinchart, Steev Klimaszewski,
	Sam Ravnborg, linux-arm-msm, Neil Armstrong, Bjorn Andersson,
	Daniel Vetter, Linus W, Jonas Karlman, Lyude Paul, Thierry Reding,
	Stephen Boyd

On Mon, 24 May 2021 17:01:49 -0700, Douglas Anderson wrote:
> The HPD (Hot Plug Detect) signal is present in many (probably even
> "most") eDP panels. For eDP, this signal isn't actually used for
> detecting hot-plugs of the panel but is more akin to a "panel ready"
> signal. After you provide power to the panel, panel timing diagrams
> typically say that you should wait for HPD to be asserted (or wait a
> fixed amount of time) before talking to the panel.
> 
> The panel-simple bindings describes many eDP panels and many of these
> panels provide the HPD signal. We should add the HPD-related
> properties to the panel-simple bindings. The HPD properties are
> actually defined in panel-common.yaml, so adding them here just
> documents that they are OK for panels handled by the panel-simple
> bindings.
> 
> NOTE: whether or not we'd include HPD properties in the panel node is
> more a property of the board design than the panel itself. For most
> boards using these eDP panels everything "magically" works without
> specifying any HPD properties and that's been why we haven't needed to
> allow the HPD properties earlier. On these boards the HPD signal goes
> directly to a dedicated "HPD" input to the eDP controller and this
> connection doesn't need to be described in the device tree. The only
> time the HPD properties are needed in the device tree are if HPD is
> hooked up to a GPIO or if HPD is normally on the panel but isn't used
> on a given board. That means that if we don't allow the HPD properties
> in panel-simple then one could argue that we've got to boot all eDP
> panels (or at least all those that someone could conceivably put on a
> system where HPD goes to a GPIO or isn't hooked up) from panel-simple.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> Changes in v8:
> - Explain better why HPD needs to be in panel-simple in commit msg.
> 
> Changes in v7:
> - List hpd properties bindings patch new for v7.
> 
>  .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child
  2021-05-28  0:29   ` Linus Walleij
@ 2021-06-02 18:06     ` Rob Herring
  2021-06-02 18:09       ` Rob Herring
  0 siblings, 1 reply; 15+ messages in thread
From: Rob Herring @ 2021-06-02 18:06 UTC (permalink / raw
  To: Linus Walleij
  Cc: Douglas Anderson, Andrzej Hajda, Neil Armstrong, Laurent Pinchart,
	Jonas Karlman, Sam Ravnborg, MSM, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, Rob Clark, Maarten Lankhorst, Thierry Reding,
	open list:DRM PANEL DRIVERS, Stanislav Lisovskiy, Stephen Boyd,
	Daniel Vetter, David Airlie, Sandeep Panda,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

On Fri, May 28, 2021 at 02:29:53AM +0200, Linus Walleij wrote:
> On Tue, May 25, 2021 at 2:02 AM Douglas Anderson <dianders@chromium.org> wrote:
> 
> > The patch ("dt-bindings: drm: Introduce the DP AUX bus") talks about
> > how using the DP AUX bus is better than learning how to slice
> > bread. Let's add it to the ti-sn65dsi86 bindings.
> >
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> (...)
> >      description: See ../../pwm/pwm.yaml for description of the cell formats.>
> 
> Just use the full path:
> /schemas/pwm/pwm.yaml

Really, just drop it. If we want have generic references and/or 
descriptions for common properties, we should generate that in pretty 
documentation (there are json-schema to doc tools already).

> 
> > +  aux-bus:
> > +    $ref: ../dp-aux-bus.yaml#
> 
> Use the full path. (Same method as above)

+1

> This removes the need for ../../... ....
> 
> You do it here:
> 
> >    ports:
> >      $ref: /schemas/graph.yaml#/properties/ports
> 
> Other than that I think it looks all right!
> 
> Yours,
> Linus Walleij

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

* Re: [PATCH v8 02/11] dt-bindings: drm: Introduce the DP AUX bus
  2021-05-25  0:01 ` [PATCH v8 02/11] dt-bindings: drm: Introduce the DP AUX bus Douglas Anderson
@ 2021-06-02 18:08   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2021-06-02 18:08 UTC (permalink / raw
  To: Douglas Anderson
  Cc: Thierry Reding, dri-devel, Stanislav Lisovskiy, Stephen Boyd,
	robdclark, Bjorn Andersson, Daniel Vetter, David Airlie,
	Steev Klimaszewski, Neil Armstrong, Maarten Lankhorst, devicetree,
	linux-kernel, Jonas Karlman, Lyude Paul, Sam Ravnborg, Linus W,
	linux-arm-msm, Laurent Pinchart, Rob Herring, Andrzej Hajda

On Mon, 24 May 2021 17:01:50 -0700, Douglas Anderson wrote:
> We want to be able to list an eDP panel as a child of an eDP
> controller node to represent the fact that the panel is connected to
> the controller's DP AUX bus. Though the panel and the controller are
> connected in several ways, the DP AUX bus is the primary control
> interface between the two and thus makes the most sense to model in
> device tree hierarchy.
> 
> Listing a panel in this way makes it possible for the panel driver to
> easily get access to the DP AUX bus that it resides on, which can be
> useful to help in auto-detecting the panel and for turning on various
> bits.
> 
> NOTE: historically eDP panels were _not_ listed under their controller
> but were listed at the top level of the device tree. This will still
> be supported for backward compatibility (and while DP controller
> drivers are adapted to support the new DT syntax) but should be
> considered deprecated since there is no downside to listing the panel
> under the controller.
> 
> For now, the DP AUX bus bindings will only support an eDP panel
> underneath. It's possible it could be extended to allow having a DP
> connector under it in the future.
> 
> The idea for this bus's design was hashed out over IRC [1].
> 
> [1] https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&date=2021-05-11
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> My DT yaml-fu is still weak. If I did something stupid, please help me
> learn how to do this better!
> 
> NOTE: there is no "Example" in this bindings file. Yikes! This is
> because I wanted to keep this patch separate from the one that enables
> the first eDP controller. See the patch ("dt-bindings: drm/aux-bus:
> Add an example") for the example.
> 
> ALSO: if anyone else would like to be listed as a "Maintainer" in this
> file then please shout!
> 
> Changes in v8:
> - Separate DP AUX bus binding is new for v8.
> 
>  .../bindings/display/dp-aux-bus.yaml          | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/dp-aux-bus.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child
  2021-06-02 18:06     ` Rob Herring
@ 2021-06-02 18:09       ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2021-06-02 18:09 UTC (permalink / raw
  To: Linus Walleij
  Cc: Douglas Anderson, Andrzej Hajda, Neil Armstrong, Laurent Pinchart,
	Jonas Karlman, Sam Ravnborg, MSM, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, Rob Clark, Maarten Lankhorst, Thierry Reding,
	open list:DRM PANEL DRIVERS, Stanislav Lisovskiy, Stephen Boyd,
	Daniel Vetter, David Airlie, Sandeep Panda,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

On Wed, Jun 02, 2021 at 01:06:09PM -0500, Rob Herring wrote:
> On Fri, May 28, 2021 at 02:29:53AM +0200, Linus Walleij wrote:
> > On Tue, May 25, 2021 at 2:02 AM Douglas Anderson <dianders@chromium.org> wrote:
> > 
> > > The patch ("dt-bindings: drm: Introduce the DP AUX bus") talks about
> > > how using the DP AUX bus is better than learning how to slice
> > > bread. Let's add it to the ti-sn65dsi86 bindings.
> > >
> > > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > (...)
> > >      description: See ../../pwm/pwm.yaml for description of the cell formats.>
> > 
> > Just use the full path:
> > /schemas/pwm/pwm.yaml
> 
> Really, just drop it. If we want have generic references and/or 
> descriptions for common properties, we should generate that in pretty 
> documentation (there are json-schema to doc tools already).

Ah, now I see this was just context, so no need for you to fix/change 
this here.

Rob


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

* Re: [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child
  2021-05-25  0:01 ` [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child Douglas Anderson
  2021-05-28  0:29   ` Linus Walleij
@ 2021-06-02 18:10   ` Rob Herring
  1 sibling, 0 replies; 15+ messages in thread
From: Rob Herring @ 2021-06-02 18:10 UTC (permalink / raw
  To: Douglas Anderson
  Cc: linux-kernel, Linus W, Laurent Pinchart, David Airlie,
	Bjorn Andersson, robdclark, linux-arm-msm, Lyude Paul,
	Neil Armstrong, Laurent Pinchart, Rob Herring, Daniel Vetter,
	Thierry Reding, Jonas Karlman, Maarten Lankhorst, Stephen Boyd,
	Sam Ravnborg, Stanislav Lisovskiy, Steev Klimaszewski,
	Sandeep Panda, Andrzej Hajda, devicetree, dri-devel

On Mon, 24 May 2021 17:01:51 -0700, Douglas Anderson wrote:
> The patch ("dt-bindings: drm: Introduce the DP AUX bus") talks about
> how using the DP AUX bus is better than learning how to slice
> bread. Let's add it to the ti-sn65dsi86 bindings.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> Changes in v8:
> - ti-sn65dsi86 references the new aux bus bindings.
> 
> Changes in v7:
> - ti-sn65dsi86: Add aux-bus child patch new for v7.
> 
>  .../bindings/display/bridge/ti,sn65dsi86.yaml | 20 ++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 

With the path updated,

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example
  2021-05-25  0:01 ` [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example Douglas Anderson
  2021-05-28  0:31   ` Linus Walleij
@ 2021-06-02 18:16   ` Rob Herring
  2021-06-02 19:55     ` Doug Anderson
  1 sibling, 1 reply; 15+ messages in thread
From: Rob Herring @ 2021-06-02 18:16 UTC (permalink / raw
  To: Douglas Anderson
  Cc: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg, linux-arm-msm, Linus W, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, robdclark, Maarten Lankhorst, Thierry Reding,
	dri-devel, Stanislav Lisovskiy, Stephen Boyd, Daniel Vetter,
	David Airlie, devicetree, linux-kernel

On Mon, May 24, 2021 at 05:01:52PM -0700, Douglas Anderson wrote:
> Now that we have an eDP controller that lists aux-bus, we can safely
> add an example to the aux-bus bindings.
> 
> NOTE: this example is just a copy of the one in the 'ti-sn65dsi86'
> one. It feels useful to have the example in both places simply because
> it's important to document the interaction between the two bindings in
> both places.

Don't forget the 3rd copy that exists in some .dts file most likely. 
That's 3 places to fix when we improve or add some schema.

I've generally been trying to de-duplicate examples...

Rob

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

* Re: [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example
  2021-06-02 18:16   ` Rob Herring
@ 2021-06-02 19:55     ` Doug Anderson
  0 siblings, 0 replies; 15+ messages in thread
From: Doug Anderson @ 2021-06-02 19:55 UTC (permalink / raw
  To: Rob Herring
  Cc: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Sam Ravnborg, linux-arm-msm, Linus W, Lyude Paul, Bjorn Andersson,
	Steev Klimaszewski, Rob Clark, Maarten Lankhorst, Thierry Reding,
	dri-devel, Stanislav Lisovskiy, Stephen Boyd, Daniel Vetter,
	David Airlie,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML

Hi,

On Wed, Jun 2, 2021 at 11:16 AM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, May 24, 2021 at 05:01:52PM -0700, Douglas Anderson wrote:
> > Now that we have an eDP controller that lists aux-bus, we can safely
> > add an example to the aux-bus bindings.
> >
> > NOTE: this example is just a copy of the one in the 'ti-sn65dsi86'
> > one. It feels useful to have the example in both places simply because
> > it's important to document the interaction between the two bindings in
> > both places.
>
> Don't forget the 3rd copy that exists in some .dts file most likely.
> That's 3 places to fix when we improve or add some schema.
>
> I've generally been trying to de-duplicate examples...

I'm interpreting your response as: please drop ${SUBJECT} patch from
the series and leave the 'dp-aux-bus.yaml' without any example. The
existing example in the bridge chip is sufficient.

-Doug

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

end of thread, other threads:[~2021-06-02 20:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-25  0:01 [PATCH v8 00/11] drm: Fix EDID reading on ti-sn65dsi86 by introducing the DP AUX bus Douglas Anderson
2021-05-25  0:01 ` [PATCH v8 01/11] dt-bindings: display: simple: List hpd properties in panel-simple Douglas Anderson
2021-06-02 18:00   ` Rob Herring
2021-05-25  0:01 ` [PATCH v8 02/11] dt-bindings: drm: Introduce the DP AUX bus Douglas Anderson
2021-06-02 18:08   ` Rob Herring
2021-05-25  0:01 ` [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child Douglas Anderson
2021-05-28  0:29   ` Linus Walleij
2021-06-02 18:06     ` Rob Herring
2021-06-02 18:09       ` Rob Herring
2021-06-02 18:10   ` Rob Herring
2021-05-25  0:01 ` [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example Douglas Anderson
2021-05-28  0:31   ` Linus Walleij
2021-06-02 18:16   ` Rob Herring
2021-06-02 19:55     ` Doug Anderson
2021-05-25  0:01 ` [PATCH v8 11/11] arm64: dts: qcom: sc7180-trogdor: Move panel under the bridge chip Douglas Anderson

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 read-only IMAP folder(s) and NNTP newsgroup(s).