1*833e5d42SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2*833e5d42SEmmanuel Vadot/*
3*833e5d42SEmmanuel Vadot * Copyright 2025 GOcontroll B.V.
4*833e5d42SEmmanuel Vadot * Author: Maud Spierings <maudspierings@gocontroll.com>
5*833e5d42SEmmanuel Vadot */
6*833e5d42SEmmanuel Vadot
7*833e5d42SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadot#include "imx8mp-pinfunc.h"
10*833e5d42SEmmanuel Vadot
11*833e5d42SEmmanuel Vadot/dts-v1/;
12*833e5d42SEmmanuel Vadot/plugin/;
13*833e5d42SEmmanuel Vadot
14*833e5d42SEmmanuel Vadot&{/} {
15*833e5d42SEmmanuel Vadot	model = "GOcontroll Moduline Display with BOE av123z7m-n17 display";
16*833e5d42SEmmanuel Vadot
17*833e5d42SEmmanuel Vadot	panel {
18*833e5d42SEmmanuel Vadot		compatible = "boe,av123z7m-n17";
19*833e5d42SEmmanuel Vadot		enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
20*833e5d42SEmmanuel Vadot		pinctrl-0 = <&pinctrl_panel>;
21*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
22*833e5d42SEmmanuel Vadot		power-supply = <&reg_3v3_per>;
23*833e5d42SEmmanuel Vadot		reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
24*833e5d42SEmmanuel Vadot
25*833e5d42SEmmanuel Vadot		ports {
26*833e5d42SEmmanuel Vadot			#address-cells = <1>;
27*833e5d42SEmmanuel Vadot			#size-cells = <0>;
28*833e5d42SEmmanuel Vadot
29*833e5d42SEmmanuel Vadot			port@0 {
30*833e5d42SEmmanuel Vadot				reg = <0>;
31*833e5d42SEmmanuel Vadot				dual-lvds-odd-pixels;
32*833e5d42SEmmanuel Vadot
33*833e5d42SEmmanuel Vadot				panel_in0: endpoint {
34*833e5d42SEmmanuel Vadot					remote-endpoint = <&lvds1_out>;
35*833e5d42SEmmanuel Vadot				};
36*833e5d42SEmmanuel Vadot			};
37*833e5d42SEmmanuel Vadot
38*833e5d42SEmmanuel Vadot			port@1 {
39*833e5d42SEmmanuel Vadot				reg = <1>;
40*833e5d42SEmmanuel Vadot				dual-lvds-even-pixels;
41*833e5d42SEmmanuel Vadot
42*833e5d42SEmmanuel Vadot				panel_in1: endpoint {
43*833e5d42SEmmanuel Vadot					remote-endpoint = <&lvds0_out>;
44*833e5d42SEmmanuel Vadot				};
45*833e5d42SEmmanuel Vadot			};
46*833e5d42SEmmanuel Vadot		};
47*833e5d42SEmmanuel Vadot	};
48*833e5d42SEmmanuel Vadot};
49*833e5d42SEmmanuel Vadot
50*833e5d42SEmmanuel Vadot&i2c4 {
51*833e5d42SEmmanuel Vadot	#address-cells = <1>;
52*833e5d42SEmmanuel Vadot	#size-cells = <0>;
53*833e5d42SEmmanuel Vadot
54*833e5d42SEmmanuel Vadot	/* sn65dsi85 */
55*833e5d42SEmmanuel Vadot	bridge@2d {
56*833e5d42SEmmanuel Vadot		compatible = "ti,sn65dsi84";
57*833e5d42SEmmanuel Vadot		reg = <0x2d>;
58*833e5d42SEmmanuel Vadot		enable-gpios = <&gpio4 14 GPIO_ACTIVE_HIGH>;
59*833e5d42SEmmanuel Vadot		pinctrl-0 = <&pinctrl_lvds_bridge>;
60*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
61*833e5d42SEmmanuel Vadot		vcc-supply = <&reg_1v8_per>;
62*833e5d42SEmmanuel Vadot
63*833e5d42SEmmanuel Vadot		ports {
64*833e5d42SEmmanuel Vadot			#address-cells = <1>;
65*833e5d42SEmmanuel Vadot			#size-cells = <0>;
66*833e5d42SEmmanuel Vadot
67*833e5d42SEmmanuel Vadot			port@0 {
68*833e5d42SEmmanuel Vadot				reg = <0>;
69*833e5d42SEmmanuel Vadot
70*833e5d42SEmmanuel Vadot				dsi_lvds_bridge_in: endpoint {
71*833e5d42SEmmanuel Vadot					data-lanes = <1 2 3 4>;
72*833e5d42SEmmanuel Vadot					remote-endpoint = <&mipi_dsi_out>;
73*833e5d42SEmmanuel Vadot				};
74*833e5d42SEmmanuel Vadot			};
75*833e5d42SEmmanuel Vadot
76*833e5d42SEmmanuel Vadot			port@2 {
77*833e5d42SEmmanuel Vadot				reg = <2>;
78*833e5d42SEmmanuel Vadot
79*833e5d42SEmmanuel Vadot				lvds0_out: endpoint {
80*833e5d42SEmmanuel Vadot					remote-endpoint = <&panel_in1>;
81*833e5d42SEmmanuel Vadot				};
82*833e5d42SEmmanuel Vadot			};
83*833e5d42SEmmanuel Vadot
84*833e5d42SEmmanuel Vadot			port@3 {
85*833e5d42SEmmanuel Vadot				reg = <3>;
86*833e5d42SEmmanuel Vadot
87*833e5d42SEmmanuel Vadot				lvds1_out: endpoint {
88*833e5d42SEmmanuel Vadot					remote-endpoint = <&panel_in0>;
89*833e5d42SEmmanuel Vadot				};
90*833e5d42SEmmanuel Vadot			};
91*833e5d42SEmmanuel Vadot		};
92*833e5d42SEmmanuel Vadot	};
93*833e5d42SEmmanuel Vadot
94*833e5d42SEmmanuel Vadot	/* max25014 @ 0x6f */
95*833e5d42SEmmanuel Vadot};
96*833e5d42SEmmanuel Vadot
97*833e5d42SEmmanuel Vadot&iomuxc {
98*833e5d42SEmmanuel Vadot	pinctrl_lvds_bridge: lvdsbridgegrp {
99*833e5d42SEmmanuel Vadot		fsl,pins = <
100*833e5d42SEmmanuel Vadot			MX8MP_IOMUXC_SAI1_TXD2__GPIO4_IO14
101*833e5d42SEmmanuel Vadot				MX8MP_DSE_X1
102*833e5d42SEmmanuel Vadot		>;
103*833e5d42SEmmanuel Vadot	};
104*833e5d42SEmmanuel Vadot
105*833e5d42SEmmanuel Vadot	pinctrl_panel: panelgrp {
106*833e5d42SEmmanuel Vadot		fsl,pins = <
107*833e5d42SEmmanuel Vadot			MX8MP_IOMUXC_GPIO1_IO07__GPIO1_IO07
108*833e5d42SEmmanuel Vadot				MX8MP_DSE_X1
109*833e5d42SEmmanuel Vadot			MX8MP_IOMUXC_GPIO1_IO09__GPIO1_IO09
110*833e5d42SEmmanuel Vadot				MX8MP_DSE_X1
111*833e5d42SEmmanuel Vadot		>;
112*833e5d42SEmmanuel Vadot	};
113*833e5d42SEmmanuel Vadot};
114*833e5d42SEmmanuel Vadot
115*833e5d42SEmmanuel Vadot&lcdif1 {
116*833e5d42SEmmanuel Vadot	status = "okay";
117*833e5d42SEmmanuel Vadot};
118*833e5d42SEmmanuel Vadot
119*833e5d42SEmmanuel Vadot&mipi_dsi {
120*833e5d42SEmmanuel Vadot	/*
121*833e5d42SEmmanuel Vadot	 * burst has to be at least 2x dsi clock that the sn65dsi85 expects
122*833e5d42SEmmanuel Vadot	 * display pixelclock * bpp / lanes / 2 = dsi clock
123*833e5d42SEmmanuel Vadot	 * 88.000.000 * 24 / 4 / 2 = 264.000.000
124*833e5d42SEmmanuel Vadot	 * range gets rounded up to 265.000.000 - 270.000.000
125*833e5d42SEmmanuel Vadot	 * 267.500.000 * 2 = 535.000.000
126*833e5d42SEmmanuel Vadot	 */
127*833e5d42SEmmanuel Vadot	samsung,burst-clock-frequency = <535000000>;
128*833e5d42SEmmanuel Vadot	samsung,esc-clock-frequency = <12000000>;
129*833e5d42SEmmanuel Vadot	status = "okay";
130*833e5d42SEmmanuel Vadot
131*833e5d42SEmmanuel Vadot	ports {
132*833e5d42SEmmanuel Vadot		port@1 {
133*833e5d42SEmmanuel Vadot			mipi_dsi_out: endpoint {
134*833e5d42SEmmanuel Vadot				data-lanes = <1 2 3 4>;
135*833e5d42SEmmanuel Vadot				remote-endpoint = < &dsi_lvds_bridge_in>;
136*833e5d42SEmmanuel Vadot			};
137*833e5d42SEmmanuel Vadot		};
138*833e5d42SEmmanuel Vadot	};
139*833e5d42SEmmanuel Vadot};
140