&route_dsi0 {
status = "disalbed"; //将okay修改disalbed
connect = <&vp2_out_dsi0>;
};
&dsi0 {
status = "disalbed"; //将okay修改disalbed
//pinctrl-names = "default";
};
<Configs>
<!--Window display dpi, valid range is 80~640, use 0 if no configuration is requeired-->
<dpi>180</dpi> //修改此值
<!-- Indicate the deviation between the default device display direction and the direction -->
<!-- of the sensor. Use 0 in default, available values are {0, 90, 180, 270} -->
<defaultDeviceRotationOffset>0</defaultDeviceRotationOffset>
<!-- Svg path for cutout, use empty string if there is not cutout on the screen -->
<!-- format: string -->
<!-- default value: empty string -->
<!-- sample: M 100,100 m -75,0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 z -->
<defaultDisplayCutoutPath></defaultDisplayCutoutPath>
<!-- Indicates the boundary of the curved screen, each value corresponds to the px from each edge -->
<!-- format: number(left) number(top) number(right) number(bottom) -->
<!-- default value: 0 0 0 0 -->
<!-- sample: 150 150 0 0 -->
<curvedScreenBoundary>0 0 0 0</curvedScreenBoundary>
YYT-MIPI7LCD2203 是一个5点电容触控、7英寸彩色 TFT-LCD 模块。该模块由以下部分组成,TFT LCD 面板、驱动电路、5点电容触控和背光。
其中 5 点电容触控拥有 26 个驱动通道和 14 个感应通道,能够满足更高的 touch 精度要求。可以同时识别 5 个触摸点位的实时准确位置、移动轨迹及触摸面积。并根据主控需求,读取相应点数的触摸信息。
YYT-MIPI7LCD2203驱动的设备树配置rk3588s-lcd-yyt.dtsi.
我们需要根据YYT-MIPI7LCD2203屏幕的配置更新dsi0节点:
&dsi0 {
status = "okay";
rockchip,lane-rate = <1000>;
dsi0_panel: panel@0 {
status = "disabled";
compatible = "simple-panel-dsi";
reg = <0>;
backlight = <&backlight>;
reset-delay-ms = <60>;
enable-delay-ms = <60>;
prepare-delay-ms = <60>;
unprepare-delay-ms = <60>;
disable-delay-ms = <60>;
dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
dsi,format = <MIPI_DSI_FMT_RGB888>;
dsi,lanes = <4>;
panel-init-sequence = [
15 00 02 80 ac
15 00 02 81 b8
15 00 02 82 09
15 00 02 83 78
15 00 02 84 7f
15 00 02 85 bb
15 00 02 86 70
];
panel-exit-sequence = [
05 00 01 28
05 00 01 10
];
disp_timings0:display-timings {
native-mode = <&dsi0_timing0>;
dsi0_timing0: timing0 {
clock-frequency = <51668640>; //DCLK
hactive = <1024>; //hactive
vactive = <600>; //vactive
hfront-porch = <160>; //hfp
hback-porch = <160>; //hbp
hsync-len = <10>; //hsa
vfront-porch = <12>; //vfp
vsync-len = <10>; //vsa
vback-porch = <23>; //vbp
hsync-active = <0>; //hync 极性控制 置 1 反转极性
vsync-active = <0>; //vsync 极性控制 置 1 反转极性
de-active = <1>; //DEN 极性控制
pixelclk-active = <0>; //dclk 极性控制
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
panel_in_dsi: endpoint {
remote-endpoint = <&dsi_out_panel>;
};
};
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
dsi_out_panel: endpoint {
remote-endpoint = <&panel_in_dsi>;
};
};
};
};
设置输出屏幕输出端口到vp2_out_dsi0:
&route_dsi0 {
status = "okay";
connect = <&vp2_out_dsi0>;
};
显示结果:
由原理图上看,mipi dsi0屏幕的触摸芯片接在i2c3上,触摸芯片采用gt911芯片,参数如下:
&i2c3 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c3m2_xfer>;
gt9xx: gt9xx@5d {
compatible = "goodix,gt9xx";
reg = <0x5d>;
touch-gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
reset-gpio = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
max-x = <1024>;
max-y = <600>;
tp-size = <911>;
pinctrl-names = "default";
pinctrl-0 = <&touch_gpio>;
status = "okay";
};
};