All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Boettcher <patrick.boettcher@posteo.de>
To: dri-devel@lists.freedesktop.org
Subject: IMX8MM: assign panel to mipi_dsi in a device tree
Date: Sun,  5 Mar 2023 15:22:48 +0000	[thread overview]
Message-ID: <20230305162248.06ba45ab@yaise-pc1> (raw)

Hi list,

After several days of trying I realize my too small/old brain is unable
to map around how to assign/connect a panel to the mipi_dsi-node in a
device.

We are using a 'tdo,tl070wsh30' panel connected to the
mipi-dsi-interface of a imx8mm.

Of all the references I found on the in public repositories none of
them is using this exact panel. Well.

Looking at other device trees I came up with the following dts-node add
to the mipi_dsi-node:

&mipi_dsi {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	port@0 {
		reg = <0>;
		mipi_dsi_panel0_out: endpoint {
			remote-endpoint = <&panel0_in>;
			attach-bridge;
		};
	};

	panel@0 {
		compatible = "tdo,tl070wsh30";
		reg = <0>;

		pinctrl-0 = <&pinctrl_mipi_dsi>;
		pinctrl-names = "default";
		reset-gpios = <&gpio4 4 GPIO_ACTIVE_LOW>;
		enable-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;

		backlight = <&panel_gpio_backlight>;
		power-supply = <&panel_gpio_regulator>;

		dsi-lanes = <4>;

		video-mode = <0>; 

		panel-width-mm = <157>;
		panel-height-mm = <86>;

		status = "okay";

		port {
			panel0_in: endpoint {
				remote-endpoint =<&mipi_dsi_panel0_out>;
 			};
		};
	};
};


You'll see that I used the attach-bridge-option, which is maybe not
necessary. I found this during a debug-print-session in the
drm-bridge-driver, it wasn't attaching a bridge. But maybe I don't need
a bridge as the panel-driver contains everything to control the
controllers of the panel. I don't really know.

However, with this I have the following messages:

[    0.393985] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/mipi_dsi@32e10000 to encoder DSI-34: -19
[    0.405626] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[    0.413974] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517

The panel driver is never instantiated.

I'm using 5.15.51 (-imx). mipi_dsi and the panel-driver are built into
the kernel.

I have to say that I'm basically trying to imitate the
device-tree-implementation based on example rather than understanding
the exact details of how to correctly work with mipi_dsi and the panel.

I'd appreciate any help and pointers which lead me into the right
direction.

Thanks in advance.

--
Patrick.







             reply	other threads:[~2023-03-05 18:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-05 15:22 Patrick Boettcher [this message]
2023-03-05 18:35 ` IMX8MM: assign panel to mipi_dsi in a device tree Jagan Teki
2023-03-05 19:45   ` Patrick Boettcher
2023-03-06  8:43     ` Frieder Schrempf
2023-03-06 19:05       ` Patrick Boettcher

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=20230305162248.06ba45ab@yaise-pc1 \
    --to=patrick.boettcher@posteo.de \
    --cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.