devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: Rob Herring <robh@kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	devicetree@vger.kernel.org, Sascha Hauer <kernel@pengutronix.de>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Michael Riesch <michael.riesch@wolfvision.net>,
	Sandy Huang <hjc@rock-chips.com>,
	Peter Geis <pgwipeout@gmail.com>
Subject: Re: [PATCH 10/12] arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi
Date: Thu, 2 Dec 2021 17:09:36 +0100	[thread overview]
Message-ID: <20211202160936.GX28260@pengutronix.de> (raw)
In-Reply-To: <6427725.puVkvWICD3@diego>

Hi Heiko,

On Thu, Dec 02, 2021 at 04:41:17PM +0100, Heiko Stübner wrote:
> Hi Sascha,
> 
> Am Donnerstag, 2. Dezember 2021, 16:34:49 CET schrieb Sascha Hauer:
> > On Wed, Nov 17, 2021 at 09:19:38AM -0600, Rob Herring wrote:
> > > On Wed, Nov 17, 2021 at 8:34 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > > >
> > > > This enabled the VOP2 display controller along with hdmi and the
> > > > required port routes which is enough to get a picture out of the
> > > > hdmi port of the board.
> > > >
> > > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > > ---
> > > >  .../boot/dts/rockchip/rk3568-evb1-v10.dts     | 24 +++++++++++++++++++
> > > >  1 file changed, 24 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts
> > > > index 184e2aa2416af..156e001492173 100644
> > > > --- a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts
> > > > +++ b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts
> > > > @@ -106,6 +106,12 @@ &gmac1m1_rgmii_clk
> > > >         status = "okay";
> > > >  };
> > > >
> > > > +&hdmi {
> > > > +       status = "okay";
> > > > +       avdd-0v9-supply = <&vdda0v9_image>;
> > > > +       avdd-1v8-supply = <&vcca1v8_image>;
> > > > +};
> > > > +
> > > >  &i2c0 {
> > > >         status = "okay";
> > > >
> > > > @@ -390,3 +396,21 @@ &sdmmc0 {
> > > >  &uart2 {
> > > >         status = "okay";
> > > >  };
> > > > +
> > > > +&vop {
> > > > +       status = "okay";
> > > > +       assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
> > > > +       assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
> > > > +};
> > > > +
> > > > +&vop_mmu {
> > > > +       status = "okay";
> > > > +};
> > > > +
> > > > +&hdmi_in_vp0 {
> > > > +       status = "okay";
> > > > +};
> > > > +
> > > > +&vp0_out_hdmi {
> > > > +       status = "okay";
> > > > +};
> > > 
> > > You can accomplish the same thing already with:
> > > 
> > > &vp0_out_hdmi {
> > >   remote-endpoint = <&hdmi_in_vp0>;
> > > };
> > 
> > My idea was to describe all possible connections in the dtsi file and
> > let the board dts writer only en/disable the needed connections. When
> > the connections are specified in the dts file then writing it is more
> > difficult and error prone.
> > 
> > > 
> > > or:
> > > 
> > > &vp0_out_hdmi {
> > >   /delete-property/ remote-endpoint;
> > > };
> > 
> > With this I have to change all connections that I don't need. With
> > status = "okay" I have to change all connections that I actually do
> > need, which will be much easier to read and write.
> > 
> > I'll stick to the status = "okay" method for the next round, maybe I can
> > still convince you ;)
> > 
> > If it's the 'status' property you don't like being used when it's not a
> > device that is enabled/disabled, then every other name would be fine
> > with me as well.
> 
> hmm, we do have code in the rockchip drm-driver to find out
> if the device at the end of a graph-connection is disabled or not [0] ,
> So on previous Rockchip socs, there are already all connections
> established, and the driver weeds out the disabled ones.
> 
> So I'm wondering what is missing to use that in a vop2 context?

The vop2 has three video ports (crtcs) instead of only one. All three are
described in the device tree and each of them has a of_graph connection
to the different encoders, so something like:

vp0 <-> hdmi
vp0 <-> mipi
vp1 <-> hdmi
vp1 <-> mipi
vp2 <-> hdmi
vp2 <-> mipi

Enabling just vp0 <-> hdmi means only the first video port is can do
hdmi. Different constraints in the clock tree (hdmi reference clock is
hardwired to hpll, not enough PLLs to put all video ports on independent
ones) prevent us from just allowing all connections.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2021-12-02 16:09 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 14:33 [PATCH v1 00/12] drm/rockchip: RK356x VOP2 support Sascha Hauer
2021-11-17 14:33 ` [PATCH 01/12] dt-bindings: display: rockchip: Add compatible for rk3568 HDMI Sascha Hauer
2021-11-27 15:07   ` Heiko Stuebner
2021-11-17 14:33 ` [PATCH 02/12] drm/rockchip: dw_hdmi: Do not leave clock enabled in error case Sascha Hauer
2021-11-17 14:33 ` [PATCH 03/12] drm/rockchip: dw_hdmi: add rk3568 support Sascha Hauer
2021-11-17 14:33 ` [PATCH 04/12] drm/rockchip: dw_hdmi: add regulator support Sascha Hauer
2021-11-29 22:46   ` Rob Herring
2021-12-07 17:01   ` Robin Murphy
2021-11-17 14:33 ` [PATCH 05/12] of: graph: Allow disabled endpoints Sascha Hauer
2021-11-17 14:33 ` [PATCH 06/12] dt-bindings: " Sascha Hauer
2021-11-17 14:33 ` [PATCH 07/12] dt-bindings: display: rockchip: Add binding for VOP2 Sascha Hauer
2021-11-17 16:10   ` Rob Herring
2021-11-17 14:33 ` [PATCH 08/12] arm64: dts: rockchip: rk356x: Add VOP2 nodes Sascha Hauer
2021-11-25 20:25   ` Johan Jonker
2021-11-26  7:40     ` Sascha Hauer
2021-11-26  8:15       ` Heiko Stübner
2021-11-17 14:33 ` [PATCH 09/12] arm64: dts: rockchip: rk356x: Add HDMI nodes Sascha Hauer
2021-11-17 15:13   ` Rob Herring
2021-12-01 16:04     ` Sascha Hauer
2021-11-17 14:33 ` [PATCH 10/12] arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi Sascha Hauer
2021-11-17 15:19   ` Rob Herring
2021-12-02 15:34     ` Sascha Hauer
2021-12-02 15:41       ` Heiko Stübner
2021-12-02 16:09         ` Sascha Hauer [this message]
2021-11-17 15:20   ` Michael Riesch
2021-11-17 15:44   ` [PATCH] arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a Michael Riesch
2021-11-25 19:44     ` Johan Jonker
2021-11-17 14:33 ` [PATCH 11/12] drm/rockchip: Make VOP driver optional Sascha Hauer
2021-11-17 14:40   ` Heiko Stübner
2021-11-17 14:50     ` Sascha Hauer
2021-11-17 15:16       ` Heiko Stübner
2021-11-17 14:33 ` [PATCH 12/12] drm: rockchip: Add VOP2 driver Sascha Hauer
2021-11-17 18:05   ` Nicolas Frattaroli
2021-11-17 19:45     ` Sascha Hauer
2021-11-26  6:44   ` kernel test robot
2021-11-17 14:54 ` [PATCH v1 00/12] drm/rockchip: RK356x VOP2 support Rob Herring
2021-11-17 15:41   ` Sascha Hauer
2021-11-18  1:27 ` Kever Yang
2021-11-18  9:26   ` Heiko Stübner
2021-11-18  9:53     ` Daniel Stone
2021-11-18 10:50       ` Kever Yang
2021-11-18 11:08         ` Michael Riesch
2021-11-18 12:07         ` Daniel Stone
2021-11-18 13:14           ` Andy Yan
2021-11-18 13:24             ` Daniel Stone
2021-11-18 10:03     ` Sascha Hauer
2021-11-21 23:18 ` Alex Bee
2021-11-22  8:10   ` Sascha Hauer
2021-11-22 17:47     ` Alex Bee
2021-11-22 19:21       ` Robin Murphy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211202160936.GX28260@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=benjamin.gaignard@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    --cc=pgwipeout@gmail.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).