20240807提取飞凌OK3588-C的IMG固件中的时钟频率link_freq和pixel_clock
2024/8/6 16:32
缘起:调试代码的时候边调试变修改,在优化MIPI CSI时钟的时候,越改越差!最后变成了负优化。
现在源代码/C文件找不到了,但是还有可用的IMG文件,于是将IMG固件刷入到飞凌OK3588-C的核心板。
使用命令拿到了所需要的时钟参数。
【急】请问 对于配置好的固件,有没有办法 读取 MIPI 摄像头的 link_freq 和 pixel_clock ?
v4l2-ctl -d /dev/v4l-subdevX --list-ctrls-menu
这个命令可以看到
root@ok3588:/dev# ls -l v4l*
crw-rw---- 1 root video 81, 8 Jan 1 08:00 v4l-subdev0
crw-rw---- 1 root video 81, 9 Jan 1 08:00 v4l-subdev1
crw-rw---- 1 root video 81, 10 Jan 1 08:00 v4l-subdev2
root@ok3588:/dev# v4l2-ctl -d /dev/v4l-subdev0 --list-ctrls-menu
root@ok3588:/dev# v4l2-ctl -d /dev/v4l-subdev1 --list-ctrls-menu
root@ok3588:/dev# v4l2-ctl -d /dev/v4l-subdev2 --list-ctrls-menu
完整的LOG记录:
root@ok3588:/#
root@ok3588:/#
root@ok3588:/# v4l2-ctl -d /dev/v4l-subdevX --list-ctrls
Cannot open device /dev/v4l-subdevX, exiting.
root@ok3588:/#
Display all 939 possibilities? (y or n)^C
root@ok3588:/# cd /dev
root@ok3588:/dev# ls -l
total 8
drwxr-xr-x 3 root root 480 Jan 1 08:00 block
drwxr-xr-x 3 root root 60 Jan 1 08:00 bus
crw-rw---- 1 root video 248, 0 Jan 1 08:00 cec0
drwxr-xr-x 2 root root 3620 Jan 1 08:00 char
crw------- 1 root root 5, 1 Jan 1 08:00 console
crw------- 1 root root 10, 124 Jan 1 08:00 cpu_dma_latency
crw-rw-rw- 1 root root 10, 125 Jan 1 08:00 crypto
drwxr-xr-x 3 root root 60 Jan 1 08:00 disk
drwxr-xr-x 2 root root 160 Jan 1 08:00 dma_heap
drwxr-xr-x 3 root root 140 Jan 1 08:00 dri
crw------- 1 root root 240, 0 Jan 1 08:00 drm_dp_aux0
crw-rw---- 1 root video 29, 0 Jan 1 08:00 fb0
lrwxrwxrwx 1 root root 13 Jan 1 08:00 fd -> /proc/self/fd
crw-rw-rw- 1 root root 1, 7 Jan 1 08:00 full
crw-rw-rw- 1 root root 10, 229 Jan 1 08:00 fuse
crw------- 1 root root 254, 0 Jan 1 08:00 gpiochip0
crw------- 1 root root 254, 1 Jan 1 08:00 gpiochip1
crw------- 1 root root 254, 2 Jan 1 08:00 gpiochip2
crw------- 1 root root 254, 3 Jan 1 08:00 gpiochip3
crw------- 1 root root 254, 4 Jan 1 08:00 gpiochip4
crw------- 1 root root 254, 5 Jan 1 08:00 gpiochip5
crw-rw-rw- 1 root root 10, 126 Jan 1 08:00 hdmirx_hdcp
crw------- 1 root root 10, 183 Jan 1 08:00 hwrng
crw------- 1 root root 89, 0 Jan 1 08:00 i2c-0
crw------- 1 root root 89, 1 Jan 1 08:00 i2c-1
crw------- 1 root root 89, 10 Jan 1 08:00 i2c-10
crw------- 1 root root 89, 2 Jan 1 08:00 i2c-2
crw------- 1 root root 89, 3 Jan 1 08:00 i2c-3
crw------- 1 root root 89, 4 Jan 1 08:00 i2c-4
crw------- 1 root root 89, 7 Jan 1 08:00 i2c-7
crw------- 1 root root 89, 9 Jan 1 08:00 i2c-9
crw------- 1 root root 245, 0 Jan 1 08:00 iio:device0
drwxr-xr-x 3 root root 140 Jan 1 08:00 input
crw-r--r-- 1 root root 1, 11 Jan 1 08:00 kmsg
srw-rw-rw- 1 root root 0 Jan 1 08:00 log
crw-rw---- 1 root disk 10, 237 Jan 1 08:00 loop-control
brw-rw---- 1 root disk 7, 0 Jan 1 08:00 loop0
brw-rw---- 1 root disk 7, 1 Jan 1 08:00 loop1
brw-rw---- 1 root disk 7, 2 Jan 1 08:00 loop2
brw-rw---- 1 root disk 7, 3 Jan 1 08:00 loop3
brw-rw---- 1 root disk 7, 4 Jan 1 08:00 loop4
brw-rw---- 1 root disk 7, 5 Jan 1 08:00 loop5
brw-rw---- 1 root disk 7, 6 Jan 1 08:00 loop6
brw-rw---- 1 root disk 7, 7 Jan 1 08:00 loop7
crw-rw-rw- 1 root root 10, 122 Jan 1 08:00 mali0
crw-rw---- 1 root video 249, 0 Jan 1 08:00 media0
crw-r----- 1 root kmem 1, 1 Jan 1 08:00 mem
brw-rw---- 1 root disk 179, 0 Jan 1 08:00 mmcblk0
brw-rw---- 1 root disk 179, 32 Jan 1 08:00 mmcblk0boot0
brw-rw---- 1 root disk 179, 64 Jan 1 08:00 mmcblk0boot1
brw-rw---- 1 root disk 179, 1 Jan 1 08:00 mmcblk0p1
brw-rw---- 1 root disk 179, 2 Jan 1 08:00 mmcblk0p2
brw-rw---- 1 root disk 179, 3 Jan 1 08:00 mmcblk0p3
brw-rw---- 1 root disk 179, 4 Jan 1 08:00 mmcblk0p4
brw-rw---- 1 root disk 179, 5 Jan 1 08:00 mmcblk0p5
brw-rw---- 1 root disk 179, 6 Jan 1 08:00 mmcblk0p6
brw-rw---- 1 root disk 179, 7 Jan 1 08:00 mmcblk0p7
brw-rw---- 1 root disk 179, 8 Jan 1 08:00 mmcblk0p8
crw------- 1 root root 237, 0 Jan 1 08:00 mmcblk0rpmb
crw------- 1 root root 241, 0 Jan 1 08:00 mpp_service
crw-rw-rw- 1 root root 1, 3 Jan 1 08:00 null
crw-r----- 1 root kmem 1, 4 Jan 1 08:00 port
crw------- 1 root root 108, 0 Jan 1 08:00 ppp
crw-rw-rw- 1 root tty 5, 2 Jan 1 08:00 ptmx
drwxr-xr-x 2 root root 0 Jan 1 08:00 pts
brw-rw---- 1 root disk 1, 0 Jan 1 08:00 ram0
crw-rw-rw- 1 root root 1, 8 Jan 1 08:00 random
crw-rw-r-- 1 root root 10, 242 Jan 1 08:00 rfkill
crw------- 1 root root 10, 123 Jan 1 08:00 rga
drwxrwxrwx 2 root root 40 Jan 1 08:00 shm
drwxr-xr-x 3 root root 220 Jan 1 08:00 snd
lrwxrwxrwx 1 root root 15 Jan 1 08:00 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Jan 1 08:00 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Jan 1 08:00 stdout -> /proc/self/fd/1
crw------- 1 root root 10, 127 Jan 1 08:00 sw_sync
crw------- 1 root root 244, 0 Jan 1 08:00 tee0
crw------- 1 root root 244, 16 Jan 1 08:00 teepriv0
crw-rw-rw- 1 root tty 5, 0 Jan 1 08:00 tty
crw--w---- 1 root tty 4, 0 Jan 1 08:00 tty0
crw--w---- 1 root tty 4, 1 Jan 1 08:00 tty1
crw--w---- 1 root tty 4, 10 Jan 1 08:00 tty10
crw--w---- 1 root tty 4, 11 Jan 1 08:00 tty11
crw--w---- 1 root tty 4, 12 Jan 1 08:00 tty12
crw--w---- 1 root tty 4, 13 Jan 1 08:00 tty13
crw--w---- 1 root tty 4, 14 Jan 1 08:00 tty14
crw--w---- 1 root tty 4, 15 Jan 1 08:00 tty15
crw--w---- 1 root tty 4, 16 Jan 1 08:00 tty16
crw--w---- 1 root tty 4, 17 Jan 1 08:00 tty17
crw--w---- 1 root tty 4, 18 Jan 1 08:00 tty18
crw--w---- 1 root tty 4, 19 Jan 1 08:00 tty19
crw--w---- 1 root tty 4, 2 Jan 1 08:00 tty2
crw--w---- 1 root tty 4, 20 Jan 1 08:00 tty20
crw--w---- 1 root tty 4, 21 Jan 1 08:00 tty21
crw--w---- 1 root tty 4, 22 Jan 1 08:00 tty22
crw--w---- 1 root tty 4, 23 Jan 1 08:00 tty23
crw--w---- 1 root tty 4, 24 Jan 1 08:00 tty24
crw--w---- 1 root tty 4, 25 Jan 1 08:00 tty25
crw--w---- 1 root tty 4, 26 Jan 1 08:00 tty26
crw--w---- 1 root tty 4, 27 Jan 1 08:00 tty27
crw--w---- 1 root tty 4, 28 Jan 1 08:00 tty28
crw--w---- 1 root tty 4, 29 Jan 1 08:00 tty29
crw--w---- 1 root tty 4, 3 Jan 1 08:00 tty3
crw--w---- 1 root tty 4, 30 Jan 1 08:00 tty30
crw--w---- 1 root tty 4, 31 Jan 1 08:00 tty31
crw--w---- 1 root tty 4, 32 Jan 1 08:00 tty32
crw--w---- 1 root tty 4, 33 Jan 1 08:00 tty33
crw--w---- 1 root tty 4, 34 Jan 1 08:00 tty34
crw--w---- 1 root tty 4, 35 Jan 1 08:00 tty35
crw--w---- 1 root tty 4, 36 Jan 1 08:00 tty36
crw--w---- 1 root tty 4, 37 Jan 1 08:00 tty37
crw--w---- 1 root tty 4, 38 Jan 1 08:00 tty38
crw--w---- 1 root tty 4, 39 Jan 1 08:00 tty39
crw--w---- 1 root tty 4, 4 Jan 1 08:00 tty4
crw--w---- 1 root tty 4, 40 Jan 1 08:00 tty40
crw--w---- 1 root tty 4, 41 Jan 1 08:00 tty41
crw--w---- 1 root tty 4, 42 Jan 1 08:00 tty42
crw--w---- 1 root tty 4, 43 Jan 1 08:00 tty43
crw--w---- 1 root tty 4, 44 Jan 1 08:00 tty44
crw--w---- 1 root tty 4, 45 Jan 1 08:00 tty45
crw--w---- 1 root tty 4, 46 Jan 1 08:00 tty46
crw--w---- 1 root tty 4, 47 Jan 1 08:00 tty47
crw--w---- 1 root tty 4, 48 Jan 1 08:00 tty48
crw--w---- 1 root tty 4, 49 Jan 1 08:00 tty49
crw--w---- 1 root tty 4, 5 Jan 1 08:00 tty5
crw--w---- 1 root tty 4, 50 Jan 1 08:00 tty50
crw--w---- 1 root tty 4, 51 Jan 1 08:00 tty51
crw--w---- 1 root tty 4, 52 Jan 1 08:00 tty52
crw--w---- 1 root tty 4, 53 Jan 1 08:00 tty53
crw--w---- 1 root tty 4, 54 Jan 1 08:00 tty54
crw--w---- 1 root tty 4, 55 Jan 1 08:00 tty55
crw--w---- 1 root tty 4, 56 Jan 1 08:00 tty56
crw--w---- 1 root tty 4, 57 Jan 1 08:00 tty57
crw--w---- 1 root tty 4, 58 Jan 1 08:00 tty58
crw--w---- 1 root tty 4, 59 Jan 1 08:00 tty59
crw--w---- 1 root tty 4, 6 Jan 1 08:00 tty6
crw--w---- 1 root tty 4, 60 Jan 1 08:00 tty60
crw--w---- 1 root tty 4, 61 Jan 1 08:00 tty61
crw--w---- 1 root tty 4, 62 Jan 1 08:00 tty62
crw--w---- 1 root tty 4, 63 Jan 1 08:00 tty63
crw--w---- 1 root tty 4, 7 Jan 1 08:00 tty7
crw--w---- 1 root tty 4, 8 Jan 1 08:00 tty8
crw--w---- 1 root tty 4, 9 Jan 1 08:00 tty9
crw-rw---- 1 root dialout 253, 0 Jan 1 08:00 ttyFIQ0
crw-rw---- 1 root dialout 4, 64 Jan 1 08:00 ttyS0
crw-rw---- 1 root dialout 4, 67 Jan 1 08:00 ttyS3
crw-rw---- 1 root dialout 4, 68 Jan 1 08:00 ttyS4
crw-rw---- 1 root dialout 4, 70 Jan 1 08:00 ttyS6
crw-rw---- 1 root dialout 4, 73 Jan 1 08:00 ttyS9
crw------- 1 root root 10, 121 Jan 1 08:00 ubi_ctrl
crw------- 1 root root 10, 239 Jan 1 08:00 uhid
crw------- 1 root root 10, 223 Jan 1 08:00 uinput
crw-rw-rw- 1 root root 1, 9 Jan 1 08:00 urandom
drwxr-xr-x 3 root root 60 Jan 1 08:00 usb-ffs
crw------- 1 root root 238, 0 Jan 1 08:00 usbmon0
crw------- 1 root root 238, 1 Jan 1 08:00 usbmon1
crw------- 1 root root 238, 2 Jan 1 08:00 usbmon2
crw------- 1 root root 238, 3 Jan 1 08:00 usbmon3
crw------- 1 root root 238, 4 Jan 1 08:00 usbmon4
crw------- 1 root root 238, 5 Jan 1 08:00 usbmon5
crw------- 1 root root 238, 6 Jan 1 08:00 usbmon6
crw------- 1 root root 238, 7 Jan 1 08:00 usbmon7
crw------- 1 root root 238, 8 Jan 1 08:00 usbmon8
drwxr-xr-x 3 root root 60 Jan 1 08:00 v4l
crw-rw---- 1 root video 81, 8 Jan 1 08:00 v4l-subdev0
crw-rw---- 1 root video 81, 9 Jan 1 08:00 v4l-subdev1
crw-rw---- 1 root video 81, 10 Jan 1 08:00 v4l-subdev2
crw-rw---- 1 root tty 7, 0 Jan 1 08:00 vcs
crw-rw---- 1 root tty 7, 1 Jan 1 08:00 vcs1
crw-rw---- 1 root tty 7, 128 Jan 1 08:00 vcsa
crw-rw---- 1 root tty 7, 129 Jan 1 08:00 vcsa1
crw-rw---- 1 root tty 7, 64 Jan 1 08:00 vcsu
crw-rw---- 1 root tty 7, 65 Jan 1 08:00 vcsu1
crw------- 1 root root 10, 120 Jan 1 08:00 vendor_storage
crw------- 1 root root 10, 137 Jan 1 08:00 vhci
-rw-r--r-- 1 root root 4 Jan 1 08:00 video-dec0
-rw-r--r-- 1 root root 4 Jan 1 08:00 video-enc0
crw-rw---- 1 root video 81, 0 Jan 1 08:00 video0
crw-rw---- 1 root video 81, 1 Jan 1 08:00 video1
crw-rw---- 1 root video 81, 2 Jan 1 08:00 video2
crw-rw---- 1 root video 81, 3 Jan 1 08:00 video3
crw-rw---- 1 root video 81, 4 Jan 1 08:00 video4
crw-rw---- 1 root video 81, 5 Jan 1 08:00 video5
crw-rw---- 1 root video 81, 6 Jan 1 08:00 video6
crw-rw---- 1 root video 81, 7 Jan 1 08:00 video7
crw-rw---- 1 root video 81, 11 Jan 1 08:00 video8
crw------- 1 root root 10, 130 Jan 1 08:00 watchdog
crw------- 1 root root 243, 0 Jan 1 08:00 watchdog0
crw-rw-rw- 1 root root 1, 5 Jan 1 08:00 zero
brw-rw---- 1 root disk 254, 0 Jan 1 08:00 zram0
root@ok3588:/dev# v4l
v4l v4l2-ctl v4l2-sysfs-path
v4l2-compliance v4l2-dbg
root@ok3588:/dev# v4l
v4l v4l2-ctl v4l2-sysfs-path
v4l2-compliance v4l2-dbg
root@ok3588:/dev# v4l-^C
root@ok3588:/dev#
root@ok3588:/dev#
root@ok3588:/dev# cd /
root@ok3588:/#
root@ok3588:/#
root@ok3588:/#
root@ok3588:/# v4l2-ctl -d /dev/v4l-subdevX --list-ctrls-menu
Cannot open device /dev/v4l-subdevX, exiting.
root@ok3588:/#
root@ok3588:/# cd /dev
root@ok3588:/dev#
root@ok3588:/dev# ls -l v4l*
crw-rw---- 1 root video 81, 8 Jan 1 08:00 v4l-subdev0
crw-rw---- 1 root video 81, 9 Jan 1 08:00 v4l-subdev1
crw-rw---- 1 root video 81, 10 Jan 1 08:00 v4l-subdev2
v4l:
total 0
drwxr-xr-x 2 root root 220 Jan 1 08:00 by-path
root@ok3588:/dev#
root@ok3588:/dev#
root@ok3588:/dev#
root@ok3588:/dev# v4l2-ctl -d /dev/v4l-subdev0 --list-ctrls-menu
root@ok3588:/dev#
root@ok3588:/dev# v4l2-ctl -d /dev/v4l-subdev1 --list-ctrls-menu
root@ok3588:/dev#
root@ok3588:/dev# v4l2-ctl -d /dev/v4l-subdev2 --list-ctrls-menu
User Controls
saturation 0x00980902 (int) : min=-4 max=4 step=1 default=0 value=0 flags=slider
white_balance_automatic 0x0098090c (bool) : default=1 value=1
gain_automatic 0x00980912 (bool) : default=1 value=1
horizontal_flip 0x00980914 (bool) : default=0 value=0
vertical_flip 0x00980915 (bool) : default=0 value=0
Camera Controls
auto_exposure 0x009a0901 (menu) : min=0 max=1 default=0 value=0
0: Auto Mode
1: Manual Mode
Image Processing Controls
link_frequency 0x009f0901 (intmenu): min=0 max=2 default=0 value=1 flags=read-only
0: 224000000 (0xd59f800)
1: 500000000 (0x1dcd6500)
2: 336000000 (0x1406f400)
pixel_rate 0x009f0902 (int64) : min=1 max=2147483647 step=1 default=1 value=168000000 flags=read-only
test_pattern 0x009f0903 (menu) : min=0 max=4 default=0 value=0
0: Disabled
1: Vertical Color Bars
2: Pseudo-Random Data
3: Color Square
4: Black Image
root@ok3588:/dev#
root@ok3588:/dev#
参考资料:
https://www.cnblogs.com/jzcn/p/17823309.html
Linux MIPI 摄像头驱动框架编写(RN6752解码芯片)
注意:?此函数的作用是绑定硬件部分的控制功能,也就是或可以通过相应的设备节点更改设备的引荐参数,比如亮度、对比度、饱和度、色调等。
可以通过命令?v4l2-ctl -d /dev/v4l-subdevX --list-ctrls?查看,如下图所示:
[08:00:13.543] Chosen EGL config details: id: 9 rgba: 8 8 8 0 buf: 24 dep: 0 stcl: 0 int: 0-1 type: win|pbf|swap_preserved vis_id: XRGB8888 (0x34325258)
[08:00:13.543] Output DSI-1 (crtc 102) video modes:
[email protected], preferred, current, 45.0 MHz
[08:00:13.544] associating input device event2 with output DSI-1 (none by udev)
[08:00:13.544] associating input device event0 with output DSI-1 (none by udev)
[08:00:13.544] Output 'DSI-1' enabled with head(s) DSI-1
[08:00:13.544] Output 'DSI-2' using color profile: built-in default sRGB SDR profile
[08:00:13.544] Chosen EGL config details: id: 9 rgba: 8 8 8 0 buf: 24 dep: 0 stcl: 0 int: 0-1 type: win|pbf|swap_preserved vis_id: XRGB8888 (0x34325258)
[08:00:13.544] Output DSI-2 (crtc 119) video modes:
[email protected], preferred, current, 45.0 MHz
[08:00:13.544] Output DSI-2 changed to mirror output
[08:00:13.544] Output 'DSI-2' enabled with head(s) DSI-2
[08:00:13.545] Compositor capabilities:
arbitrary surface rotation: yes
screen capture uses y-flip: yes
cursor planes: yes
arbitrary resolutions: no
view mask clipping: yes
explicit sync: no
color operations: yes
presentation clock: CLOCK_MONOTONIC, id 1
presentation clock resolution: 0.000000001 s
[08:00:13.545] Loading module '/usr/lib/weston/desktop-shell.so'
[08:00:13.549] launching '/usr/libexec/weston-keyboard'
[08:00:13.551] Note: support for the deprecated wl_shell interface is disabled. If a legacy client still needs it, it can be re-enabled by passing -Ddeprecated-wl-shell=true to Meson when building Weston.
[08:00:13.552] launching '/usr/libexec/weston-desktop-shell'
could not load cursor 'dnd-move'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-none'
xkbcommon: ERROR: couldn't find a Compose file for locale "C" (mapped to "C")
could not create XKB compose table for locale 'C'. Disabiling compose
QStandardPaths: runtime directory '/var/run' is not a directory, but a symbolic link to a directory permissions 0755 owned by UID 0 GID 0
Failure: No such entity
OK
Starting sshd: xkbcommon: ERROR: couldn't find a Compose file for locale "C" (mapped to "C")
could not create XKB compose table for locale 'C'. Disabiling compose
OK
Debug: configfs_init
mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uac1.gs0': No such file or directory
mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uac2.gs0': No such file or directory
mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/mtp.gs0': No such file or directory
mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/rndis.gs0': No such file or directory
mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/acm.gs6': No such file or directory
mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/hid.usb0': No such file or directory
Starting vsftpd: OK
Starting dnsmasq:
dnsmasq: unknown interface uap0
FAIL
Starting input-event-daemon: input-event-daemon: Start parsing /etc/input-event-daemon.conf...
input-event-daemon: Adding device: /dev/input/event0...
input-event-daemon: Adding device: /dev/input/event1...
input-event-daemon: Adding device: /dev/input/event2...
input-event-daemon: Adding device: /dev/input/event3...
input-event-daemon: Start listening on 4 devices...
done
root@ok3588:/# [08:00:16.867] Detected a monitor change on head 'HDMI-A-1', not bothering to do anything about it.
[08:00:16.868] Detected a monitor change on head 'DSI-1', not bothering to do anything about it.
[08:00:16.868] Detected a monitor change on head 'DSI-2', not bothering to do anything about it.
root@ok3588:/#
root@ok3588:/#
root@ok3588:/#
Display all 939 possibilities? (y or n)^C
root@ok3588:/#
root@ok3588:/#
root@ok3588:/#
root@ok3588:/# ls -l
total 4067996
-rw-r--r-- 1 root root 0 Jan 1 1970 RED110000_1280x1024IR.mp4
drwxr-xr-x 2 root root 4096 Mar 9 2023 bin
-rw-r--r-- 1 root root 351 Mar 9 2023 busybox.fragment
lrwxrwxrwx 1 root root 8 Mar 9 2023 data -> userdata
drwxr-xr-x 14 root root 3840 Jan 1 08:00 dev
drwxr-xr-x 23 root root 4096 Jan 1 08:00 etc
-rw-r--r-- 1 root root 3581044195 Jan 1 1970 fpga110000-405-1080p60.mp4
-rw-r--r-- 1 root root 584495534 Jan 1 1970 fpga18000-405-1080p60.mp4
drwxr-xr-x 4 root root 4096 Jan 1 08:00 home
drwxr-xr-x 6 root root 4096 Aug 17 2023 lib
lrwxrwxrwx 1 root root 3 Mar 9 2023 lib64 -> lib
lrwxrwxrwx 1 root root 11 Mar 9 2023 linuxrc -> bin/busybox
drwx------ 2 root root 16384 Mar 9 2023 lost+found
drwxr-xr-x 14 root root 4096 Mar 9 2023 media
lrwxrwxrwx 1 root root 23 Mar 9 2023 misc -> /dev/block/by-name/misc
drwxr-xr-x 4 root root 4096 Mar 9 2023 mnt
drwxr-xr-x 3 root root 4096 Jul 4 2024 oem
drwxr-xr-x 2 root root 4096 Mar 9 2023 opt
dr-xr-xr-x 252 root root 0 Jan 1 08:00 proc
drwx------ 2 root root 4096 Mar 9 2023 root
drwxr-xr-x 7 root root 340 Jan 1 08:00 run
drwxr-xr-x 2 root root 4096 Sep 14 2023 sbin
lrwxrwxrwx 1 root root 10 Mar 9 2023 sdcard -> mnt/sdcard
dr-xr-xr-x 14 root root 0 Jan 1 08:00 sys
drwxrwxrwt 7 root root 400 Jan 1 08:00 tmp
lrwxrwxrwx 1 root root 9 Mar 9 2023 udisk -> mnt/udisk
drwxr-xr-x 5 root root 4096 Jan 1 08:00 userdata
drwxr-xr-x 11 root root 4096 Sep 14 2023 usr
drwxr-xr-x 5 root root 4096 Mar 9 2023 var
root@ok3588:/#
root@ok3588:/#
root@ok3588:/#
root@ok3588:/#
root@ok3588:/# cd /dev
root@ok3588:/dev#
root@ok3588:/dev#
root@ok3588:/dev# ls -l v4l*
crw-rw---- 1 root video 81, 8 Jan 1 08:00 v4l-subdev0
crw-rw---- 1 root video 81, 9 Jan 1 08:00 v4l-subdev1
crw-rw---- 1 root video 81, 10 Jan 1 08:00 v4l-subdev2
v4l:
total 0
drwxr-xr-x 2 root root 220 Jan 1 08:00 by-path
root@ok3588:/dev#
root@ok3588:/dev#
root@ok3588:/dev#
root@ok3588:/dev# v4l2-ctl -d /dev/v4l-subdev2 --list-ctrls-menu
User Controls
saturation 0x00980902 (int) : min=-4 max=4 step=1 default=0 value=0 flags=slider
white_balance_automatic 0x0098090c (bool) : default=1 value=1
gain_automatic 0x00980912 (bool) : default=1 value=1
horizontal_flip 0x00980914 (bool) : default=0 value=0
vertical_flip 0x00980915 (bool) : default=0 value=0
Camera Controls
auto_exposure 0x009a0901 (menu) : min=0 max=1 default=0 value=0
0: Auto Mode
1: Manual Mode
Image Processing Controls
link_frequency 0x009f0901 (intmenu): min=0 max=1 default=0 value=1 flags=read-only
0: 240000000 (0xe4e1c00)
1: 450000000 (0x1ad27480)
pixel_rate 0x009f0902 (int64) : min=1 max=2147483647 step=1 default=1 value=120000000 flags=read-only
test_pattern 0x009f0903 (menu) : min=0 max=4 default=0 value=0
0: Disabled
1: Vertical Color Bars
2: Pseudo-Random Data
3: Color Square
4: Black Image
root@ok3588:/dev#
root@ok3588:/dev# cd /
root@ok3588:/#
root@ok3588:/# ls -l
total 4067996
-rw-r--r-- 1 root root 0 Jan 1 08:01 RED110000_1280x1024IR.mp4
drwxr-xr-x 2 root root 4096 Mar 9 2023 bin
-rw-r--r-- 1 root root 351 Mar 9 2023 busybox.fragment
lrwxrwxrwx 1 root root 8 Mar 9 2023 data -> userdata
drwxr-xr-x 14 root root 3840 Jan 1 08:00 dev
drwxr-xr-x 23 root root 4096 Jan 1 08:00 etc
-rw-r--r-- 1 root root 3581044195 Jan 1 1970 fpga110000-405-1080p60.mp4
-rw-r--r-- 1 root root 584495534 Jan 1 1970 fpga18000-405-1080p60.mp4
drwxr-xr-x 4 root root 4096 Jan 1 08:00 home
drwxr-xr-x 6 root root 4096 Aug 17 2023 lib
lrwxrwxrwx 1 root root 3 Mar 9 2023 lib64 -> lib
lrwxrwxrwx 1 root root 11 Mar 9 2023 linuxrc -> bin/busybox
drwx------ 2 root root 16384 Mar 9 2023 lost+found
drwxr-xr-x 14 root root 4096 Mar 9 2023 media
lrwxrwxrwx 1 root root 23 Mar 9 2023 misc -> /dev/block/by-name/misc
drwxr-xr-x 4 root root 4096 Mar 9 2023 mnt
drwxr-xr-x 3 root root 4096 Jul 4 2024 oem
drwxr-xr-x 2 root root 4096 Mar 9 2023 opt
dr-xr-xr-x 252 root root 0 Jan 1 08:00 proc
drwx------ 2 root root 4096 Mar 9 2023 root
drwxr-xr-x 7 root root 340 Jan 1 08:00 run
drwxr-xr-x 2 root root 4096 Sep 14 2023 sbin
lrwxrwxrwx 1 root root 10 Mar 9 2023 sdcard -> mnt/sdcard
dr-xr-xr-x 14 root root 0 Jan 1 08:00 sys
drwxrwxrwt 7 root root 400 Jan 1 08:00 tmp
lrwxrwxrwx 1 root root 9 Mar 9 2023 udisk -> mnt/udisk
drwxr-xr-x 5 root root 4096 Jan 1 08:00 userdata
drwxr-xr-x 11 root root 4096 Sep 14 2023 usr
drwxr-xr-x 5 root root 4096 Mar 9 2023 var
root@ok3588:/#
root@ok3588:/#
root@ok3588:/# uname -a
Linux ok3588 5.10.66 #19 SMP Thu Jul 4 17:34:29 CST 2024 aarch64 GNU/Linux
root@ok3588:/#
root@ok3588:/#
Z:\OK3588_Linux_fs\kernel\drivers\media\i2c\ov5645.c
static const s64 link_freq[] = {
224000000,
500000000,
336000000
};
static const struct ov5645_mode_info ov5645_mode_info_data[] = {
{
.width = 2560,
.height = 1440,
.max_fps = {
.numerator = 10000,
.denominator = 300000,
},
.data = ov5645_setting_full,
.data_size = ARRAY_SIZE(ov5645_setting_full),
//.pixel_clock = 120000000,
.pixel_clock = 168000000,
.link_freq = 1 /* an index in link_freq[] */
},
//{
// .width = 2592,
// .height = 1944,
// .max_fps = {
// .numerator = 10000,
// .denominator = 300000,
//},
// .data = ov5645_setting_full,
// .data_size = ARRAY_SIZE(ov5645_setting_full),
// .pixel_clock = 168000000,
// .link_freq = 1 /* an index in link_freq[] */
//},
};
文章评论