1. Display簡介?
RK3588 的VOP (video output process)分為4個(gè)Port:
port | 分辨率 |
---|---|
VP0 | 4K |
VP1 | 4K |
VP2 | 4K |
VP3 | 1080P |
RK3588 VP 和各顯?接口的連接關(guān)系:
需要注意的是,RK3588 的 HDMI 和 DP ?持 8K 輸出,但是在 8K 輸出模式下,?個(gè)顯?接口需要同時(shí)占? VP0 和 VP1 。所以如果產(chǎn) 品上需要?持 8K 顯?輸出,VP1 上要注意不要連接其他顯?接口。
1.2 RK3588支持的顯示接口?
2個(gè)DP
2個(gè)HDMI/eDP 共用接口
BT656/BT1120
2. ArmSoM-W3顯示接口?
ArmSoM-W3有著豐富的顯示接口。最多支持四路顯示輸出:兩路HDMI,一路MIPI-DSI,外加一路DP接口。可以做到多屏同顯/異顯。
下面對各個(gè)顯示輸出接口的配置和使用作基本的介紹
3. HDMI?
ArmSoM-W3硬件上有兩個(gè) HDMI 顯示輸出接口:2x HDMI OUT2.1
其中一個(gè)HDMI OUT 支持 8K@60fps 或者 4K@120fps另一個(gè)HDMI OUT 支持 4K@60fps
3.1 HDMI相關(guān)的DTS配置?
kernelarcharm64bootdtsrockchiprk3588-armsom-w3.dts
//打開 HDMI0 功能&hdmi0 { status = "okay";};//打開 HDMI0 的 硬件 phy&hdptxphy_hdmi0 { status = "okay";};//配置HDMI0到VP0上面&hdmi0_in_vp0 { status = "okay";};//打開 HDMI0 音頻輸出&hdmi0_sound { status = "okay";};//配置HDMI0上面顯示開機(jī)logo&route_hdmi0 { status = "okay";};//打開 hdmi1 功能&hdmi1 { status = "okay";};//打開 hdmi1 的 硬件 phy&hdptxphy_hdmi1 { status = "okay";};//配置HDMI1到VP1上面&hdmi1_in_vp1 { status = "okay";};//打開 HDMI1 音頻輸出&hdmi1_sound { status = "okay";};//配置HDMI1上面顯示開機(jī)logo&route_hdmi1 { status = "okay";};
4. DP?
ArmSoM-W3硬件上有一個(gè) Type-C 接口輸出的DP,分辨率可達(dá) 8192x4320@30Hz, PHY 鏈路速率可以達(dá)到 8.1Gbps/lane。
4.1 DTS配置?
4.1.1 DP 控制器的配置如下:?
&dp0 {status = "okay";};&dp0_in_vp2 {status = "okay";};
4.1.2 PHY 配置如下:?
&usbdp_phy0 { status = "okay"; orientation-switch; svid = ??0xff01???>; sbu1-dc-gpios = ??&gpio4 RK_PA6 GPIO_ACTIVE_HIGH???>; sbu2-dc-gpios = ??&gpio4 RK_PA7 GPIO_ACTIVE_HIGH???>; port { #address-cells = ??1???>; #size-cells = ??0???>; usbdp_phy0_orientation_switch: endpoint@0 { reg = ??0???>; remote-endpoint = ??&usbc0_orien_sw???>; }; usbdp_phy0_dp_altmode_mux: endpoint@1 { reg = ??1???>; remote-endpoint = ??&dp_altmode_mux???>; }; };};
4.1.3 Type-C 接口配置PD 芯片?
Type-C 接口需要通過 Type-C 的 CC 檢測和 PD 協(xié)商來配置 lane 和 HPD 的狀態(tài), 所以還需要配置 PD 芯 ?(當(dāng)前?持的 PD 芯?有 fusb302, husb311):
&i2c4 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = ??&i2c4m1_xfer???>; usbc0: fusb302@22 { compatible = "fcs,fusb302"; reg = ??0x22???>; interrupt-parent = ??&gpio3???>; interrupts = ??RK_PB4 IRQ_TYPE_LEVEL_LOW???>; int-n-gpios = ??&gpio3 RK_PB4 GPIO_ACTIVE_LOW???>; pinctrl-names = "default"; pinctrl-0 = ??&usbc0_int???>; //vbus-supply = ??&vcc12v_dcin???>; vbus-supply = ??&vbus5v0_typec???>; status = "okay"; ports { #address-cells = ??1???>; #size-cells = ??0???>; port@0 { reg = ??0???>; usbc0_role_sw: endpoint@0 { remote-endpoint = ??&dwc3_0_role_switch???>; }; }; }; usb_con: connector { compatible = "usb-c-connector"; label = "USB-C"; data-role = "dual"; power-role = "dual"; try-power-role = "sink"; op-sink-microwatt = ??1000000???>; sink-pdos = ??PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM) PDO_FIXED(9000, 3000, PDO_FIXED_USB_COMM) PDO_FIXED(12000, 3000, PDO_FIXED_USB_COMM)???>; source-pdos = ??PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)???>; altmodes { #address-cells = ??1???>; #size-cells = ??0???>; altmode@0 { reg = ??0???>; svid = ??0xff01???>; vdo = ??0xffffffff???>; }; }; ports { #address-cells = ??1???>; #size-cells = ??0???>; port@0 { reg = ??0???>; usbc0_orien_sw: endpoint { remote-endpoint = ??&usbdp_phy0_orientation_switch???>; }; }; port@1 { reg = ??1???>; dp_altmode_mux: endpoint { remote-endpoint = ??&usbdp_phy0_dp_altmode_mux???>; }; }; }; }; };};
4.1.4 配置DP開機(jī) logo?
&route_dp0 { status = "okay"; connect = ??&vp2_out_dp0???>;};
需要注意的是,這?的 connect 屬性配置 DP 在 U-Boot 階段綁定 VOP Port2, 所以 dtsi 中的配置要允許 DP綁定 VOP Port2:
&dp0_in_vp2 { status = "okay";};
提示
?前不?持 Type-C 接口的 DP 開機(jī) logo!
4.2 調(diào)試?
4.2.1 查看 connector 狀態(tài):?
在 /sys/class/drm ?錄下可以看到驅(qū)動注冊的各個(gè) card,其中 card0-DP-1 是 DP 顯?設(shè)備
armsom@armsom:~$ ls /sys/class/drm/card0 card0-DP-1 card0-HDMI-A-1 card0-Writeback-1 card1 renderD128 renderD129 version
以 card0-DP-1 為例,其?錄下有如下內(nèi)容:
armsom@armsom:~$ ls /sys/class/drm/card0-DP-1/device dpms edid enabled modes power status subsystem uevent
enable 查看使能狀態(tài):
armsom@armsom:~$ cat /sys/class/drm/card0-DP-1/enableddisabled
status 查看連接狀態(tài):
armsom@armsom:~$ cat /sys/class/drm/card0-DP-1/statusdisconnected
4.2.2 強(qiáng)制使能/禁? DP?
#強(qiáng)制禁? DPrk3588_s:/ # echo off > /sys/class/drm/card0-DP-1/status#強(qiáng)制使能 DPrk3588_s:/ # echo on > /sys/class/drm/card0-DP-1/status#恢復(fù)熱插拔檢測rk3588_s:/ # echo detect > /sys/class/drm/card0-DP-1/status
5. MIPI DSI?
ArmSoM-W3硬件上有一個(gè) MIPI-DSI 顯示輸出接口,支持 DPHY2.0 和 4 Lane 的數(shù)據(jù)輸出,分辨率可達(dá) 4K@60Hz
5.1 原理圖?
5.3 MIPI DSI相關(guān)的DTS配置?
5.3.1背光配置?
dsi1_backlight: dsi1-backlight { status = "okay"; compatible = "pwm-backlight"; pwms = ??&pwm2 0 25000 0???>; brightness-levels = < 0 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 >; default-brightness-level = ??200???>; enable-gpios = ??&gpio2 RK_PC2 GPIO_ACTIVE_HIGH???>; pinctrl-names = "default"; pinctrl-0 = ??&dsi1_backlight_en???>; };
5.3.2 屏幕上電時(shí)序以及參數(shù)配置?
&dsi1 { status = "okay"; dsi1_panel: panel@0 { status = "okay"; compatible = "simple-panel-dsi"; reg = ??0???>; power-supply = ??&vcc_lcd_mipi1???>; //使用gpio模擬regulator reset-gpios = ??&gpio2 RK_PC1 GPIO_ACTIVE_LOW???>; backlight = ??&dsi1_backlight???>; pinctrl-names = "default"; pinctrl-0 = ??&dsi1_lcd_rst_gpio???>; reset-delay-ms = ??10???>; enable-delay-ms = ??10???>; prepare-delay-ms = ??10???>; unprepare-delay-ms = ??10???>; disable-delay-ms = ??10???>; 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 B0 01 15 00 02 C0 26 15 00 02 C1 10 15 00 02 C2 0E 15 00 02 C3 00 15 00 02 C4 00 15 00 02 C5 23 15 00 02 C6 11 15 00 02 C7 22 15 00 02 C8 20 15 00 02 C9 1E 15 00 02 CA 1C 15 00 02 CB 0C 15 00 02 CC 0A 15 00 02 CD 08 15 00 02 CE 06 15 00 02 CF 18 15 00 02 D0 02 15 00 02 D1 00 15 00 02 D2 00 15 00 02 D3 00 15 00 02 D4 26 15 00 02 D5 0F 15 00 02 D6 0D 15 00 02 D7 00 15 00 02 D8 00 15 00 02 D9 23 15 00 02 DA 11 15 00 02 DB 21 15 00 02 DC 1F 15 00 02 DD 1D 15 00 02 DE 1B 15 00 02 DF 0B 15 00 02 E0 09 15 00 02 E1 07 15 00 02 E2 05 15 00 02 E3 17 15 00 02 E4 01 15 00 02 E5 00 15 00 02 E6 00 15 00 02 E7 00 15 00 02 B0 03 15 00 02 BE 04 15 00 02 B9 40 15 00 02 CC 88 15 00 02 C8 0C 15 00 02 C9 07 15 00 02 CD 01 15 00 02 CA 40 15 00 02 CE 1A 15 00 02 CF 60 15 00 02 D2 08 15 00 02 D3 08 15 00 02 DB 01 15 00 02 D9 06 15 00 02 D4 00 15 00 02 D5 01 15 00 02 D6 04 15 00 02 D7 03 15 00 02 C2 00 15 00 02 C3 0E 15 00 02 C4 00 15 00 02 C5 0E 15 00 02 DD 00 15 00 02 DE 0E 15 00 02 E6 00 15 00 02 E7 0E 15 00 02 C2 00 15 00 02 C3 0E 15 00 02 C4 00 15 00 02 C5 0E 15 00 02 DD 00 15 00 02 DE 0E 15 00 02 E6 00 15 00 02 E7 0E 15 00 02 B0 06 15 00 02 C0 A5 15 00 02 D5 1C 15 00 02 C0 00 15 00 02 B0 00 15 00 02 BD 30 15 00 02 F9 5C 15 00 02 C2 14 15 00 02 C4 14 15 00 02 BF 15 15 00 02 C0 0C 15 00 02 B0 00 15 00 02 B1 79 15 00 02 BA 8F 05 78 01 11 05 78 01 29 ]; panel-exit-sequence = [ 05 32 01 28 05 78 01 10 ]; disp_timings1: display-timings { native-mode = ??&dsi1_timing0???>; dsi1_timing0: timing0 { clock-frequency = ??160000000???>; hactive = ??1200???>; vactive = ??1920???>; hfront-porch = ??80???>; hsync-len = ??1???>; hback-porch = ??60???>; vfront-porch = ??35???>; vsync-len = ??1???>; vback-porch = ??25???>; hsync-active = ??0???>; vsync-active = ??0???>; de-active = ??0???>; pixelclk-active = ??1???>; }; }; ports { #address-cells = ??1???>; #size-cells = ??0???>; port@0 { reg = ??0???>; panel_in_dsi1: endpoint { remote-endpoint = ??&dsi1_out_panel???>; }; }; }; }; ports { #address-cells = ??1???>; #size-cells = ??0???>; port@1 { reg = ??1???>; dsi1_out_panel: endpoint { remote-endpoint = ??&panel_in_dsi1???>; }; }; };};
5.3.3 打開對應(yīng)的dsi節(jié)點(diǎn),開機(jī)logo?
//打開背光的pwm節(jié)點(diǎn) &pwm2 { status = "okay"; pinctrl-names = "active"; pinctrl-0 = ??&pwm2m2_pins???>; }; //在dsi1上接了一個(gè)mipi屏,這個(gè)配置開啟dsi1 &dsi1 { status = "okay"; }; &mipi_dcphy1 { status = "okay"; }; //默認(rèn)dsi配置vp2和vp3上面,這里配置為dsi使用vp3,可以根據(jù)屏的分辨率來確認(rèn)使用vp2還是vp3,vp2支持4K,vp3只支持 2048x1536 &dsi1_in_vp2 { status = "disabled"; }; &dsi1_in_vp3 { status = "okay"; }; //配置dsi1顯示開機(jī)logo &route_dsi1 { status = "okay"; connect = ??&vp3_out_dsi1???>; };
5.4. 調(diào)試?
通過如下指令即可查詢 VOP 的狀態(tài):
cat /sys/kernel/debug/dri/0/summary
獲取的 VOP 狀態(tài)如下圖:
Video Portx: 表?當(dāng)前的 Video Port 的狀態(tài)
Connector: Video Port 當(dāng)前連接的輸出接口
Display mode: Video Port 當(dāng)前輸出時(shí)序
Clusterx-winx(Esmartx-winx): 圖層信息
5.5 MIPI-DSI 預(yù)覽
審核編輯 黃宇
-
Display
+關(guān)注
關(guān)注
1文章
53瀏覽量
24737 -
Rockchip
+關(guān)注
關(guān)注
0文章
73瀏覽量
18590 -
RK3588
+關(guān)注
關(guān)注
6文章
335瀏覽量
4388
發(fā)布評論請先 登錄
相關(guān)推薦
評論