1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7#include <dt-bindings/display/media-bus-format.h>
8#include "rk3562-evb1-lp4x-v10.dtsi"
9#include "rk3562-android.dtsi"
10#include "rk3562-rk817.dtsi"
11
12
13/ {
14	panel-rgb {
15		compatible = "simple-panel";
16		status = "okay";
17		backlight = <&backlight>;
18		enable-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
19		reset-delay-ms = <20>;
20		enable-delay-ms = <20>;
21		prepare-delay-ms = <20>;
22		unprepare-delay-ms = <20>;
23		disable-delay-ms = <20>;
24		bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
25		width-mm = <164>;
26		height-mm = <100>;
27
28		display-timings {
29			native-mode = <&timing0>;
30
31			timing0: timing0 {
32				clock-frequency = <50000000>;
33				hactive = <1024>;
34				vactive = <600>;
35				hback-porch = <140>;
36				hfront-porch = <160>;
37				vback-porch = <20>;
38				vfront-porch = <12>;
39				hsync-len = <20>;
40				vsync-len = <3>;
41				hsync-active = <0>;
42				vsync-active = <0>;
43				de-active = <0>;
44				pixelclk-active = <0>;
45			};
46		};
47
48		ports {
49			#address-cells = <1>;
50			#size-cells = <0>;
51
52			port@0 {
53				reg = <0>;
54				panel_in_rgb: endpoint {
55					remote-endpoint = <&rgb_out_panel>;
56				};
57			};
58		};
59	};
60};
61
62&backlight {
63	pwms = <&pwm9 0 25000 0>;
64	status = "okay";
65};
66
67&dsi {
68	status = "disabled";
69};
70
71/*
72 * The pins of gmac0 and rgb are multiplexed
73 */
74&gmac0 {
75	status = "disabled";
76};
77
78&rgb {
79	status = "okay";
80	pinctrl-0 = <&rgb666_pins>;
81
82	ports {
83		port@1 {
84			reg = <1>;
85
86			rgb_out_panel: endpoint {
87				remote-endpoint = <&panel_in_rgb>;
88			};
89		};
90	};
91};
92
93&rgb_in_vp0 {
94	status = "okay";
95};
96
97&pwm9 {
98	pinctrl-names = "active";
99	pinctrl-0 = <&pwm9m0_pins>;
100	status = "okay";
101};
102
103&route_rgb {
104	status = "okay";
105	connect = <&vp0_out_rgb>;
106};
107
108/*
109 * The pins of sai0 and backlight are multiplexed
110 */
111&sai0 {
112	status = "disabled";
113};
114
115&video_phy {
116	status = "disabled";
117};
118