Firefly开源社区

标题: RK3566 + RK628D驱动板使用问题 [打印本页]

作者: zhhtao    时间: 2024-8-15 16:42
标题: RK3566 + RK628D驱动板使用问题


RK3566提供的系统镜像Ubuntu有2个,他们之间有什么区别?
我要使用RK3566 + RK628D驱动板,烧写哪个系统合适?有没有已经集成了驱动的系统镜像。
我看网上RK628D的驱动教程里面,是用了几个IO口去做控制的,但是这个驱动板只有一个MIPI CSI接口和开发板连接,那么其他的控制IO呢?
谢谢

tchip_askquestions

cJSON-master.zip

448.81 KB, 下载次数: 1, 下载积分: 灯泡 -1 , 经验 -1


作者: qq号2317783075    时间: 2024-8-15 20:07
本来就有i2c和reset等脚位,可以确认一下驱动是否有加
作者: zhhtao    时间: 2024-8-19 10:23
ROC-RK3566-PC + RK628D转接板;
我分别测试了2个固件;ROC-RK3566-PC Android11.0 固件,这个固件测试628是没有问题的;
这个固件:ROC-RK3566-PC Ubuntu20.04 固件,测试后有问题;
内核相关日志看起来没有问题,但是/dev列表下是没有识别到对应的video设备,只有系统默认的video0~video4;
日志如下:
启动之前插入hdmi和628;启动日志中的相关部分:

[    1.462895] vdd_cpu: override max_uV, 1390000 -> 1387500
[    1.628219] vccio_sd: ramp_delay not set
[    2.060373] rk628-csi-v4l2 4-0050: RK628 I2C driver version: 00.00.08
[    2.103729] rk628-csi-v4l2 4-0050: RK628 MCU + I2C Mode
[    2.107401] rockchip-csi2-dphy csi2-dphy0: dphy0 matches m00_b_rk628-csi 4-0050:bus type 4
[    2.249720] m00_b_rk628-csi 4-0050: rk628-csi-v4l2 found @ 0xa0 (rk3x-i2c)
[    2.273628] cfg80211: failed to load regulatory.db
[    3.299146] rk628-csi-v4l2 4-0050: clock detected!
[    3.299481] rk628-csi-v4l2 4-0050: clk det over cnt:0, reg_0x6654:0x801000a1
[    3.303370] rk628-csi-v4l2 4-0050: clock stable!
[    3.303715] rk628-csi-v4l2 4-0050: cdr_mode:16, cdr_data:161
[    3.304239] rk628-csi-v4l2 4-0050: cdr_mode:16, pll_man:0x7a108
[    3.309535] rk628-csi-v4l2 4-0050: cdr_mode:16, dc_gain:1, rd_offset:0, edge:0x2d5190
[    3.361199] rk628-csi-v4l2 4-0050: channel:0, round:0, max_zero_cnt:2193, max_val:0x33f9b7
[    3.366802] rk628-csi-v4l2 4-0050: channel:1, round:0, max_zero_cnt:2069, max_val:0x287a2b
[    3.372298] rk628-csi-v4l2 4-0050: channel:2, round:0, max_zero_cnt:2400, max_val:0x34add9
[    3.421710] rk628-csi-v4l2 4-0050: channel:0, round:1, max_zero_cnt:2189, max_val:0x2c2b1b
[    3.428172] rk628-csi-v4l2 4-0050: channel:1, round:1, max_zero_cnt:2000, max_val:0x412c43
[    3.434362] rk628-csi-v4l2 4-0050: channel:2, round:1, max_zero_cnt:2400, max_val:0x2ec879
[    3.483349] rk628-csi-v4l2 4-0050: channel:0, round:2, max_zero_cnt:2000, max_val:0x344f2f
[    3.489077] rk628-csi-v4l2 4-0050: channel:1, round:2, max_zero_cnt:2076, max_val:0x3c7df0
[    3.495201] rk628-csi-v4l2 4-0050: channel:2, round:2, max_zero_cnt:2400, max_val:0x38c3b0
[    3.543779] rk628-csi-v4l2 4-0050: channel:0, round:3, max_zero_cnt:2000, max_val:0x729cf1
[    3.549542] rk628-csi-v4l2 4-0050: channel:1, round:3, max_zero_cnt:2000, max_val:0x54bbbd
[    3.555472] rk628-csi-v4l2 4-0050: channel:2, round:3, max_zero_cnt:2000, max_val:0x621dfe
[    3.604291] rk628-csi-v4l2 4-0050: channel:0, round:4, max_zero_cnt:2000, max_val:0x5e01f5
[    3.609871] rk628-csi-v4l2 4-0050: channel:1, round:4, max_zero_cnt:1998, max_val:0x405f18
[    3.615382] rk628-csi-v4l2 4-0050: channel:2, round:4, max_zero_cnt:2000, max_val:0x6e5505
[    3.664200] rk628-csi-v4l2 4-0050: channel:0, round:5, max_zero_cnt:2163, max_val:0x4e061c
[    3.669838] rk628-csi-v4l2 4-0050: channel:1, round:5, max_zero_cnt:2000, max_val:0x453f74
[    3.675121] rk628-csi-v4l2 4-0050: channel:2, round:5, max_zero_cnt:2127, max_val:0x5b6087
[    3.675181] rk628-csi-v4l2 4-0050: rk628_combrxphy_chose_round_for_ch channel:0, rd:0
[    3.675191] rk628-csi-v4l2 4-0050: rk628_combrxphy_chose_round_for_ch channel:1, rd:2
[    3.675199] rk628-csi-v4l2 4-0050: rk628_combrxphy_chose_round_for_ch channel:2, rd:2
[    3.675207] rk628-csi-v4l2 4-0050: last equ gain ch0:0, ch1:2, ch2:2
[    3.892473] rk628-csi-v4l2 4-0050: channel alignment done
[    3.892546] rk628-csi-v4l2 4-0050: rx initial done
[    4.009497] m00_b_rk628-csi 4-0050: rk628_csi_format_change: New format: 1920x1080p60.0 (2200x1125)
作者: luwy    时间: 2024-8-19 13:51
log看起来是正常的,默认的节点就是/dev/video0,使用有什么问题吗,您是如何验证有问题的,我这边按照wiki的脚本,验证是ok的
https://wiki.t-firefly.com/HDMI- ... er-shi-yong-fang-fa
作者: zhhtao    时间: 2024-8-19 17:40
谢谢,是我之前一个参数没有配置对,我发现是可以读取了,不过有个问题;
参数 video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 , 30fps是没有问题的,可以正常处理;
video/x-raw,format=NV12,width=1920,height=1080,framerate=60/1 ,  60fps就直接报错了,
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
看起来是数据源的问题,跟628模块有关。628模块的参数是支持1080P@60fps的。但是我测试的结果来看是有问题的。
作者: luwy    时间: 2024-8-20 10:12
测试60fps 可以使用下面的命令
  1. GST_DEBUG=fpsdisplaysink:6 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080 ! queue ! fpsdisplaysink video-sink="kmssink plane-id=73 connector-id=108" sync=false text-overlay=false
复制代码

plane-id和connector-id可以通过如下 命令获取
  1. cat /sys/kernel/debug/dri/0/state | grep "connector\["
  2. connector[106]: Writeback-1
  3. connector[108]: HDMI-A-1

  4. cat /sys/kernel/debug/dri/0/state | grep "Esmart"
  5. plane[73]: Esmart0-win0
复制代码

作者: czg516    时间: 2024-8-21 23:14
本帖最后由 czg516 于 2024-8-21 23:16 编辑
luwy 发表于 2024-8-20 10:12
测试60fps 可以使用下面的命令

plane-id和connector-id可以通过如下 命令获取


按照您的方法,还是不能正常设置,不能测试60fps,错误信息如下:
root@firefly:~# GST_DEBUG=fpsdisplaysink:6 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080 ! queue ! fpsdisplaysink video-sink="kmssink plane-id=73 connector-id=108" sync=false text-overlay=false
Setting pipeline to PAUSED ...
0:00:00.114640533  4685   0x5597c946d0 DEBUG         fpsdisplaysink fpsdisplaysink.c:440:fps_display_sink_start:<fpsdisplaysink0> Use text-overlay? 0
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0: Could not get allowed GstCaps of device
Additional debug info:
gstkmssink.c(1087): gst_kms_sink_start (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0:
driver does not provide mode settings configuration
Setting pipeline to NULL ...
Freeing pipeline ...
root@firefly:~#


作者: luwy    时间: 2024-8-22 10:03
你的plane-id和connector-id 有没有设置对
作者: czg516    时间: 2024-8-22 13:48
luwy 发表于 2024-8-22 10:03
你的plane-id和connector-id 有没有设置对

root@firefly:/userdata# cat /sys/kernel/debug/dri/0/state | grep "connector\["
connector[106]: Writeback-1
connector[108]: HDMI-A-1
root@firefly:/userdata# cat /sys/kernel/debug/dri/0/state | grep "Esmart"
plane[73]: Esmart0-win0
root@firefly:/userdata# GST_DEBUG=fpsdisplaysink:6 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080 ! queue ! fpsdisplaysink video-sink="kmssink plane-id=73 connector-id=108" sync=false text-overlay=false
Setting pipeline to PAUSED ...
0:00:00.111151571  6292   0x556fa40cd0 DEBUG         fpsdisplaysink fpsdisplaysink.c:440:fps_display_sink_start:<fpsdisplaysink0> Use text-overlay? 0
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0: Could not get allowed GstCaps of device
Additional debug info:
gstkmssink.c(1087): gst_kms_sink_start (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0:
driver does not provide mode settings configuration
Setting pipeline to NULL ...
Freeing pipeline ...
root@firefly:/userdata#
按照您给的操作,检查了,两个ID都是正确的
作者: czg516    时间: 2024-8-22 14:54
luwy 发表于 2024-8-22 10:03
你的plane-id和connector-id 有没有设置对

我的需求是这样,通过RK628D接入HDMI的视频源,然后对视频源进行录像,分辨率1920*1080,帧率是30的时候没有问题,可以录制。但是当帧率设置为60的时候,会报错如下:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.003095870
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

作者: luwy    时间: 2024-8-23 10:00
我这边测试没有问题啊
  1. root@firefly:/# GST_DEBUG=fpsdisplaysink:6 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080 ! queue ! fpsd>
  2. Setting pipeline to PAUSED ...
  3. 0:00:00.642663648  1047   0x5572920ed0 DEBUG         fpsdisplaysink fpsdisplaysink.c:440:fps_display_sink_start:<fpsdisplaysink0> Use text-overlay? 0
  4. Pipeline is live and does not need PREROLL ...
  5. Setting pipeline to PLAYING ...
  6. New clock: GstSystemClock
  7. 0:00:02.235007308  1047   0x5572979000 DEBUG         fpsdisplaysink fpsdisplaysink.c:372:display_current_fps:<fpsdisplaysink0> Updated max-fps to 58.0
  8. 91143
  9. 0:00:02.235276225  1047   0x5572979000 DEBUG         fpsdisplaysink fpsdisplaysink.c:376:display_current_fps:<fpsdisplaysink0> Updated min-fps to 58.0
  10. 91143
  11. 0:00:02.751517360  1047   0x5572979000 DEBUG         fpsdisplaysink fpsdisplaysink.c:372:display_current_fps:<fpsdisplaysink0> Updated max-fps to 60.0
  12. 11788
  13. 0:00:06.851622522  1047   0x5572979000 DEBUG         fpsdisplaysink fpsdisplaysink.c:372:display_current_fps:<fpsdisplaysink0> Updated max-fps to 60.0
  14. 12887
  15. 0:00:22.651553194  1047   0x5572979000 DEBUG         fpsdisplaysink fpsdisplaysink.c:372:display_current_fps:<fpsdisplaysink0> Updated max-fps to 60.0
  16. 17665
复制代码

我用的固件版本是
  1. root@firefly:/# cat proc/version
  2. Linux version 4.19.232 (llq@tchip14) (rk356x/firefly: f7165816db073abb32bfe4f754a317d687c7bbcf) (sdk version: rk356x_linux_release_20230710_v1.3.2f.xm
  3. l) (gcc version 10.3.1 20210621 (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)), GNU ld (GNU Toolchain for the A-profile Archi
  4. tecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #796 SMP Mon Jul 17 10:36:36 CST 2023
复制代码

作者: czg516    时间: 2024-8-23 11:27
luwy 发表于 2024-8-23 10:00
我这边测试没有问题啊

我用的固件版本是

请问您的固件是从哪里下载的,我是从官方下载ubuntu固件
作者: luwy    时间: 2024-8-23 14:25
https://pan.baidu.com/s/1ebjbGVA ... 1670-20701074579022

就是从官网下载的,用的230719 版本
作者: czg516    时间: 2024-8-23 16:46
luwy 发表于 2024-8-23 14:25
https://pan.baidu.com/s/1ebjbGVABiHiPyLw5z6p0CA?pwd=1234#list/path=%2Fsharelink1414141670-2070107457 ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[    0.000000] Linux version 4.19.232 (llq@tchip14) (rk356x/firefly: f7165816db073abb32bfe4f754a317d687c7bbcf) (sdk version: rk356x_linux_release_20230
710_v1.3.2f.xml) (gcc version 10.3.1 20210621 (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)), GNU ld (GNU Toolchain for the A-
profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #796 SMP Mon Jul 17 10:36:36 CST 2023
我也是这个版本,好奇怪




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1