大家好,
我是一名嵌入式系统的学生(来自法国),我正在围绕 V851S 制作这个小板。 它应该用于连接树莓派相机或 esp32-cam 相机,并使用 usb-uvc 将它们用作 USB 网络摄像头。
该项目仍处于早期阶段,我是这个论坛的新手,所以我想我只是将其作为介绍发布。
以下是该板的一些图片:
大家好,
我是一名嵌入式系统的学生(来自法国),我正在围绕 V851S 制作这个小板。 它应该用于连接树莓派相机或 esp32-cam 相机,并使用 usb-uvc 将它们用作 USB 网络摄像头。
该项目仍处于早期阶段,我是这个论坛的新手,所以我想我只是将其作为介绍发布。
以下是该板的一些图片:
大家好,
我已经使用 yukilizard 项目的 BSP 以及 tina-V853 存储库成功为 V851S 构建了映像。 但现在我想为 V851S 构建 GCC。 当我在 Developpement->GCC 中启用该选项(它自己启用其他选项)并且我“make”时,它编译得很好,直到到达 GCC,此时我遇到了此错误:
make menuconfig options
error
有谁知道我如何/是否可以解决这个问题?
大家好,
我的 V851S (tina-linux) 上的 i2c/twi 总线似乎有问题,每次我尝试使用 i2cdump 或 i2cDetect 等 shell i2C 实用程序时,我都会收到以下错误 (i2cget 和 i2cwrite 也会发生这种情况):
root@TinaLinux:/sys/devices/platform/soc/pio/gpiochip0/gpio/gpio8# i2cdetect 1
[ 786.358195] i2c i2c-1: ioctl, cmd=0x705, arg=0xbea72c6c
i2cdetect: WARNING! This program can confuse your I2C bus
Continue? [y/N] y
0 1 2 3 4 5 6 7 8 [ 789.513384] i2c i2c-1: ioctl, cmd=0x703, arg=0x03
9 a b c d e f
00: [ 789.521510] i2c i2c-1: ioctl, cmd=0x720, arg=0xbea72c4c
[ 789.530134] i2c i2c-1: master_xfer[0] W, addr=0x03, len=0
[ 789.536525] twi_start()508 - [i2c1] START can't sendout!
[ 789.542553] sunxi_i2c_do_xfer()1951 - [i2c1] twi_regulator:
[ 789.549191] twi_start()508 - [i2c1] START can't sendout!
[ 789.555137] sunxi_i2c_do_xfer()1951 - [i2c1] twi_regulator:
[ 789.561763] twi_start()508 - [i2c1] START can't sendout!
[ 789.567722] sunxi_i2c_do_xfer()1951 - [i2c1] twi_regulator:
-- [ 789.574219] i2c i2c-1: ioctl, cmd=0x703, arg=0x04
[ 789.579759] i2c i2c-1: ioctl, cmd=0x720, arg=0xbea72c4c
[ 789.585615] i2c i2c-1: master_xfer[0] W, addr=0x04, len=0
[ 789.591919] twi_start()508 - [i2c1] START can't sendout!
[ 789.597882] sunxi_i2c_do_xfer()1951 - [i2c1] twi_regulator:
[ 789.604494] twi_start()508 - [i2c1] START can't sendout!
[ 789.610452] sunxi_i2c_do_xfer()1951 - [i2c1] twi_regulator:
[ 789.617068] twi_start()508 - [i2c1] START can't sendout!
[ 789.623016] sunxi_i2c_do_xfer()1951 - [i2c1] twi_regulator:
-- [ 789.629512] i2c i2c-1: ioctl, cmd=0x703, arg=0x05
[ 789.635030] i2c i2c-1: ioctl, cmd=0x720, arg=0xbea72c4c
[ 789.640964] i2c i2c-1: master_xfer[0] W, addr=0x05, len=0
[ 789.647206] twi_start()508 - [i2c1] START can't sendout!
[ 789.653155] sunxi_i2c_do_xfer()1951 - [i2c1] twi_regulator:
[ 789.659783] twi_start()508 - [i2c1] START can't sendout!
[ 789.665728] sunxi_i2c_do_xfer()1951 - [i2c1] twi_regulator:
[ 789.672352] twi_start()508 - [i2c1] START can't sendout!
[ 789.678309] sunxi_i2c_do_xfer()1951 - [i2c1] twi_regulator:
这是我的 I2C 内核配置:
和我的 i2c“menuconfig”:
我知道至少已经有一篇关于此问题的帖子,但这只是一条警告消息,在我的情况下,它无法正常工作,因为我在 I2C 1 的地址 0x36 上有一个未检测到的设备。
我怎样才能摆脱这些错误?
我的 twi DTS 配置如下:
twi0_pins_a: twi0@0 {
allwinner,pins = "PA16", "PA17";
allwinner,pname = "twi0_scl", "twi0_sda";
allwinner,function = "twi0";
allwinner,muxsel = <4>;
allwinner,drive = <0>;
allwinner,pull = <1>;
};
twi0_pins_b: twi0@1 {
allwinner,pins = "PA16", "PA17";
allwinner,function = "io_disabled";
allwinner,muxsel = <0xf>;
allwinner,drive = <0>;
allwinner,pull = <0>;
};
twi1_pins_a: twi1@0 {
allwinner,pins = "PA6", "PA7";
allwinner,pname = "twi1_scl", "twi1_sda";
allwinner,function = "twi1";
allwinner,muxsel = <4>;
allwinner,drive = <0>;
allwinner,pull = <1>;
};
twi1_pins_b: twi1@1 {
allwinner,pins = "PA6", "PA7";
allwinner,function = "io_disabled";
allwinner,muxsel = <0xf>;
allwinner,drive = <0>;
allwinner,pull = <0>;
};
twi2_pins_a: twi2@0 {
allwinner,pins = "PH11", "PH12";
allwinner,pname = "twi2_scl", "twi2_sda";
allwinner,function = "twi2";
allwinner,muxsel = <5>;
allwinner,drive = <0>;
allwinner,pull = <1>;
};
twi2_pins_b: twi2@1 {
allwinner,pins = "PH11", "PH12";
allwinner,function = "io_disabled";
allwinner,muxsel = <0xf>;
allwinner,drive = <0>;
allwinner,pull = <0>;
};
twi3_pins_a: twi3@0 {
allwinner,pins = "PI3", "PI4";
allwinner,pname = "twi3_scl", "twi3_sda";
allwinner,function = "twi6";
allwinner,muxsel = <6>;
allwinner,drive = <0>;
allwinner,pull = <1>;
};
twi3_pins_b: twi3@1 {
allwinner,pins = "PI3", "PI4";
allwinner,function = "io_disabled";//io_disabled
allwinner,muxsel = <0xf>;
allwinner,drive = <0>;
allwinner,pull = <0>;
};
twi4_pins_a: twi4@0 {
allwinner,pins = "PI1", "PI2";
allwinner,pname = "twi4_scl", "twi4_sda";
allwinner,function = "twi4";
allwinner,muxsel = <5>;
allwinner,drive = <0>;
allwinner,pull = <1>;
};
twi4_pins_b: twi4@1 {
allwinner,pins = "PI1", "PI2";
allwinner,function = "io_disabled";
allwinner,muxsel = <0xf>;
allwinner,drive = <0>;
allwinner,pull = <0>;
};
大家好,我目前正在为 V851S 构建映像,并且我总是在“make”期间看到弹出这些警告:
Check Vendor Package...
CreateSoftLink /home/kanken/code/tina-v853-open/openwrt/openwrt/package/subpackage link to /home/kanken/code/tina-v853-open/openwrt/package
end
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-libav/Makefile' has a build dependency on 'libgstreamer1', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-libav/Makefile' has a build dependency on 'gstreamer1-plugins-base', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-omx/Makefile' has a dependency on 'libgst1gl', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-aw/Makefile' has a build dependency on 'libgstreamer1', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-aw/Makefile' has a build dependency on 'gstreamer1-plugins-base', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-aw/Makefile' has a build dependency on 'gstreamer1-plugins-good', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-bad/Makefile' has a dependency on 'wayland', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-bad/Makefile' has a dependency on 'wayland-protocols', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-bad/Makefile' has a dependency on 'libgst1badvideo', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-bad/Makefile' has a dependency on 'libgst1gl', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-bad/Makefile' has a build dependency on 'libgstreamer1', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-bad/Makefile' has a build dependency on 'gstreamer1-plugins-base', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-base/Makefile' has a build dependency on 'libgstreamer1', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-good/Makefile' has a build dependency on 'libgstreamer1', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-good/Makefile' has a build dependency on 'gstreamer1-plugins-base', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-ugly/Makefile' has a build dependency on 'libgstreamer1', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/multimedia/gstreamer/gst1-plugins-ugly/Makefile' has a build dependency on 'gstreamer1-plugins-base', which does not exist
WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'kmod-sunxi-rf-wlan', which does not exist
WARNING: Makefile 'package/subpackage/allwinner/eyesee-mpp/middleware/Makefile' has a dependency on 'awsystrace', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/gui/qt/qt5/Makefile' has a dependency on 'weston', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/gui/qt/qt5/Makefile' has a dependency on 'wayland', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/gui/qt/qt5/Makefile' has a dependency on 'qt5-multimediawidgets', which does not exist
WARNING: Makefile 'package/subpackage/thirdparty/gui/qt/qt5/Makefile' has a build dependency on 'libstdcpp', which does not exist
copy from /home/kanken/code/tina-v853-open/openwrt/target/v851s/v851s-lizard/defconfig
它们引用了我已经安装在我的电脑上的软件包,但它们不会消失,这是正常的还是我错过了这里的一个步骤?我应该忽略这些警告吗?
这绝对是一种奇怪的锁定官方图像的方式......尤其是对于那些不流利中文的人 X')
感谢这篇文章,它有帮助。
事实证明 .ko 文件确实是由“make”命令构建的,但它们只是没有被发送到图像:
为了能够将它们包含在图像中,我必须编辑 openwrt/target/v851S/<board_name> 中的文件:
添加我需要的各种 ov 驱动程序并注释掉我不需要的 gc2053 驱动程序
这仍然有点奇怪,这不是自动配置的,需要您手动编辑这些 makefile...感觉很笨重
我让它工作了!
我必须编辑 DTS 将驱动强度增加到 1,并将 1.8V 总线电压从 1.7V 提高到 2V 才能注册,现在我的相机出现了!
默认的 0 驱动强度永远不会起作用。 编辑 DTS 是关键。
大家好,
当我在 kernel_menuconfig 中将 OV5640 和 OV5658 驱动程序设置为编译为模块 (M) 时(并且禁用 gc_2053):
我编辑 DTS 以反映更改:
并编译/运行,似乎没有考虑到更改。 menuconfig 中的其他更改确实适用于图像,但 kernel_menuconfig 中完成的某些更改则不然。 看这里,gc_2053 驱动程序仍然处于活动状态,而 OV 驱动程序却不见踪影:
知道为什么会出现这种情况吗?
@awwwwa 这确实消除了警告,所以感谢这一点,但是 i2cdetect 的结果仍然完全错过了总线上的任何 I2C 设备...所以根本问题仍然存在...
@j_biao 目前我还无法让它发挥作用,我仍然停留在与以前相同的位置。 我购买了一台高速逻辑分析仪来尝试看看 mipi 总线上发生了什么。
看起来 mipi 通道的行为根本不像 mipi 通道,这看起来像并行 csi 数据(如果有的话)(时钟通道应该是不同的,但它们不是?)...这很奇怪,因为我仔细检查了两次和三次 我的 i2c/CCI 配置和所有正确的配置应发送到 OV5647 以进入 mipi 模式,而不是并行 csi 模式。
我将尝试获取树莓派 3 来调试它如何设置相机并查看 I2C 和 MIPI 方面的任何差异。
@alb702 我在驱动程序源代码和camerademo命令中尝试了许多不同的像素格式,但它总是最终无法实际工作并给出某种形式的错误。 除了 RGGB8 之外,相机不支持其他格式,当我使用 RGGB8 时,camerademo 会查询传感器的图像,这意味着它至少可以工作到那时。
然后等待帧返回超时,我仍在尝试理解原因,但显然存在相机配置方式或 allwinner 驱动程序期望如何接收帧的问题。
如果这是图像格式的问题,我不会收到这种特定类型的错误:
当尝试编译 libAWIspApi 时,您可能会收到编译错误,make 抱怨“all”目标没有构建候选者,这是因为 libAWIspApi makefile 不正确(或者我认为是这样),而不是这样:
/tina-v853-open/openwrt/openwrt/package/subpackage/allwinner/vision/libAWIspApi/Makefile
include $(TOPDIR)/rules.mk
-include machinfo/$(LICHEE_IC)/build.mk
PKG_NAME:=libAWIspApi
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SUBMENU:=Vision
SECTION:=allwinner
CATEGORY:=Allwinner
TITLE:=camera VIN ISP api for Allwinner
endef
define Package/$(PKG_NAME)/description
camera VIN ISP api for allwinner
endef
define Build/Prepare
$(INSTALL_DIR) $(PKG_BUILD_DIR)/src
$(CP) ./src/$(ISP_DIR)/* $(PKG_BUILD_DIR)/src
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/src\
ARCH="$(TARGET_ARCH)" \
AR="$(TARGET_AR)" \
CC="$(TARGET_CC)" \
CXX="$(TARGET_CXX)" \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
C_LIB_TYPE="$(CONFIG_LIBC)$(if $(CONFIG_EXT_TOOLCHAIN_GCC_8_3_0),-gcc8_3_0)" \
CPU_VARIANT="$(TARGET_CPU_VARIANT)$(if $(CONFIG_COMPLILE_KERNEL64_USER32),-user-32bit)" \
all
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
它应该是这样的:
include $(TOPDIR)/rules.mk
-include machinfo/$(LICHEE_IC)/build.mk
PKG_NAME:=libAWIspApi
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SUBMENU:=Vision
SECTION:=allwinner
CATEGORY:=Allwinner
TITLE:=camera VIN ISP api for Allwinner
endef
define Package/$(PKG_NAME)/description
camera VIN ISP api for allwinner
endef
define Build/Prepare
$(INSTALL_DIR) $(PKG_BUILD_DIR)/src/isp600
$(CP) ./src/isp600/$(ISP_DIR)/* $(PKG_BUILD_DIR)/src/isp600
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/src/isp600\
ARCH="$(TARGET_ARCH)" \
AR="$(TARGET_AR)" \
CC="$(TARGET_CC)" \
CXX="$(TARGET_CXX)" \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
C_LIB_TYPE="$(CONFIG_LIBC)$(if $(CONFIG_EXT_TOOLCHAIN_GCC_8_3_0),-gcc8_3_0)" \
CPU_VARIANT="$(TARGET_CPU_VARIANT)$(if $(CONFIG_COMPLILE_KERNEL64_USER32),-user-32bit)" \
all
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
这对我有用。
我已经购买了树莓派相机模块 V2 (IMX219),我尝试使用提供的驱动程序模块,很明显它无法像现在一样工作。 我必须将通道设置更改为 2 通道和相应的寄存器,因为驱动程序默认配置为 4 通道 mipi csi 操作。
经过几次测试后,我遇到了同样的问题,camerademo 超时并且不保存任何帧。 正如您在日志中看到的那样,I2C 配置已完美发送,它与我发送的配置匹配,寄存器有意义,数据格式应为 RGB8 位。
root@TinaLinux:/# camerademo RGGB8 1280 720 30 bmp /tmp 5
[CAMERA]************************[ 106.325471] [imx219]entering sensor_power
********************************[ 106.332158] [imx219]entering sensor_power PWR_ON, pins: 1 0
**
[CAMERA]* [ 106.341204] [imx219]PWR_ON!100
*
[CAMERA]* this is camera test. [ 106.355469] [VIN_ERR]imx219 cannot find the match sensor_helper
*
[CAMERA]* *
[CAMERA]********[ 106.370358] [VIN_ERR]imx219 cannot find the match sensor_helper
********************************[ 106.377305] [VIN_ERR]imx219 cannot find the match sensor_helper
******************
[CAMERA]**********************************************************
[CAMERA][ 106.394725] [VIN_ERR]imx219 cannot find the match sensor_helper
open /dev/video0!
[CAMERA]**********************************************************
[CAMERA]**********************************************************
[CAMERA] The path to data saving is /tmp.
[CAMERA] The number of captured photos is 5.
[CAMERA] sa[ 106.421709] [VIN_ERR]imx219 cannot find the match sensor_helper
ve bmp format
[ 106.442489] [imx219]entering sensor_power
[ 106.446997] [imx219]entering sensor_power PWR_ON, pins: 1 0
[ 106.453243] [imx219]PWR_ON!100
[ 106.464759] [VIN_ERR]imx219 cannot find the match sensor_helper
[ 106.479407] [VIN_ERR]imx219 cannot find the match sensor_helper
[ 106.486050] [VIN_ERR]imx219 cannot find the match sensor_helper
[ 106.500689] [VIN_ERR]imx219 cannot find the match sensor_helper
[ 106.526778] [VIN_ERR]imx219 cannot find the match sensor_helper
[ 106.546028] [imx219]IMX219 found: 0x19
[ 106.550783] [VIN_ERR]vin is not support this pixelformat
[ 106.556950] [VIN_ERR]vin is not support this pixelformat
[ 106.563035] [VIN_ERR]vin is not support this pixelformat
[ 106.569236] [VIN_ERR]vin is not support this pixelformat
[ 106.575351] [VIN_ERR]vin is not support this pixelformat
[ 106.581437] [VIN_ERR]vin is not support this pixelformat
[ 106.587540] [VIN_ERR]vin is not support this pixelformat
[ 106.593920] [VIN_ERR]vin is not support this pixelformat
[ 106.600029] [VIN_ERR]vin is not support this pixelformat
[ 106.606125] [VIN_ERR]vin is not support this pixelformat
[ 106.612205] [VIN_ERR]vin is not support this pixelformat
[ 106.618370] [VIN_ERR]vin is not support this pixelformat
[ 106.624458] [VIN_ERR]vin is not support this pixelformat
[ 106.630563] [VIN_ERR]vin is not support this pixelformat
[ 106.636660] [VIN_ERR]vin is not support this pixelformat
[ 106.642741] [VIN_ERR]vin is not support this pixelformat
[ 106.648841] [VIN_ERR]vin is not support this pixelformat
[ 106.654949] [VIN_ERR]vin is not support this pixelformat
[ 106.661031] [VIN_ERR]vin is not support this pixelformat
[CAMERA]********************************************************[ 106.670585] [imx219]sensor_s_stream on = 1, 1280*720 31384142
**
[CAMERA] Using format parameters RGGB8.
[CAMERA] camera pix[ 106.684056] [VIN_DEV_I2C]read from imx219 addr is 0x30eb, data is 0x0
elformat: RGGB8
[CAMERA] Resolu[ 106.692344] [VIN_DEV_I2C]read from imx219 addr is 0x30eb, data is 0x0
tion size : 1280 * 720
[CAMERA][ 106.702334] [VIN_DEV_I2C]read from imx219 addr is 0x300a, data is 0xff
The photo save path is /tmp.
[[ 106.712417] [VIN_DEV_I2C]read from imx219 addr is 0x300b, data is 0xff
CAMERA] The number of photos tak[ 106.722584] [VIN_DEV_I2C]read from imx219 addr is 0x30eb, data is 0x0
en is 5.
[ 106.732510] [VIN_DEV_I2C]read from imx219 addr is 0x30eb, data is 0x0
pid: 863, g_alloc_context = 0x2[ 106.742495] [VIN_DEV_I2C]read from imx219 addr is 0x114, data is 0x1
ecd0
[CAMERA] Camera capture f[ 106.752394] [VIN_DEV_I2C]read from imx219 addr is 0x128, data is 0x0
ramerate is 1/1
[CAMERA] VIDIOC[ 106.762271] [VIN_DEV_I2C]read from imx219 addr is 0x12a, data is 0x18
_S_FMT succeed
[CAMERA] fmt.typ[ 106.772314] [VIN_DEV_I2C]read from imx219 addr is 0x12b, data is 0x0
e = 9
[CAMERA] fmt.fmt.pix_mp.w[ 106.782168] [VIN_DEV_I2C]read from imx219 addr is 0x160, data is 0x2
idth = 1280
[CAMERA] fmt.fmt.pi[ 106.792056] [VIN_DEV_I2C]read from imx219 addr is 0x161, data is 0x0
x_mp.height = 720
[CAMERA] fmt.[ 106.801948] [VIN_DEV_I2C]read from imx219 addr is 0x162, data is 0xd
fmt.pix_mp.pixelformat = RGGB8
[ 106.811838] [VIN_DEV_I2C]read from imx219 addr is 0x163, data is 0xe8
[CAMERA] fmt.fmt.pix_mp.field = [ 106.821877] [VIN_DEV_I2C]read from imx219 addr is 0x164, data is 0x3
1
[ 106.831726] [VIN_DEV_I2C]read from imx219 addr is 0x165, data is 0xe8
[ 106.839218] [VIN_DEV_I2C]read from imx219 addr is 0x166, data is 0x8
[ 106.846610] [VIN_DEV_I2C]read from imx219 addr is 0x167, data is 0xe7
[ 106.854086] [VIN_DEV_I2C]read from imx219 addr is 0x168, data is 0x3
[ 106.861477] [VIN_DEV_I2C]read from imx219 addr is 0x169, data is 0x68
[ 106.869015] [VIN_DEV_I2C]read from imx219 addr is 0x16a, data is 0x6
[ 106.876410] [VIN_DEV_I2C]read from imx219 addr is 0x16b, data is 0x37
[ 106.883888] [VIN_DEV_I2C]read from imx219 addr is 0x16c, data is 0x5
[ 106.891284] [VIN_DEV_I2C]read from imx219 addr is 0x16d, data is 0x0
[ 106.898679] [VIN_DEV_I2C]read from imx219 addr is 0x16e, data is 0x2
[ 106.906067] [VIN_DEV_I2C]read from imx219 addr is 0x16f, data is 0xd0
[ 106.913540] [VIN_DEV_I2C]read from imx219 addr is 0x170, data is 0x1
[ 106.920972] [VIN_DEV_I2C]read from imx219 addr is 0x171, data is 0x1
[ 106.928369] [VIN_DEV_I2C]read from imx219 addr is 0x174, data is 0x0
[ 106.935760] [VIN_DEV_I2C]read from imx219 addr is 0x175, data is 0x0
[ 106.943138] [VIN_DEV_I2C]read from imx219 addr is 0x18c, data is 0xa
[ 106.950531] [VIN_DEV_I2C]read from imx219 addr is 0x18d, data is 0xa
[ 106.957922] [VIN_DEV_I2C]read from imx219 addr is 0x301, data is 0x5
[ 106.965353] [VIN_DEV_I2C]read from imx219 addr is 0x303, data is 0x1
[ 106.972733] [VIN_DEV_I2C]read from imx219 addr is 0x304, data is 0x3
[ 106.980134] [VIN_DEV_I2C]read from imx219 addr is 0x305, data is 0x3
[ 106.987531] [VIN_DEV_I2C]read from imx219 addr is 0x306, data is 0x0
[ 106.994916] [VIN_DEV_I2C]read from imx219 addr is 0x307, data is 0x57
[ 107.002397] [VIN_DEV_I2C]read from imx219 addr is 0x309, data is 0x5
[ 107.009786] [VIN_DEV_I2C]read from imx219 addr is 0x30b, data is 0x1
[ 107.017220] [VIN_DEV_I2C]read from imx219 addr is 0x30c, data is 0x0
[ 107.024601] [VIN_DEV_I2C]read from imx219 addr is 0x30d, data is 0x5a
[ 107.032102] [VIN_DEV_I2C]read from imx219 addr is 0x100, data is 0x1
[ 107.043636] [imx219]s_fmt set width = 1280, height = 720
[CAMERA] stream on succeed
[CAMERA] camera0 capture num is [0]
[CAMERA_ERR] camera0[ 109.053436] [imx219]sensor_s_stream on = 0, 1280*720 31384142
select timeout,end capture thread!
[CAMERA] Capture thread finish
[CAMERA] close /dev/video0
[CAMERA_ERR] capture_photo return error
root@TinaLinux:/#
目前,要么是我的内核配置有问题,要么是我的 mipi 线路上的主板出现硬件问题……但这两者似乎都不明显,对于如此低的数据速率,我的路由应该“足够好”。
这些“VIN 格式不支持”错误也很奇怪,因为我似乎使用了正确的格式。
我附上了我的IMX219.C驱动程序的修改版本,如果有人想看一下,我现在唯一尝试支持的设置是720P。
imx219.c
ov5647_mipi.c
我还附上了主板的完整启动日志,有很多启动错误,但我怀疑它们实际上与当前问题有关,因为所有必需的模块都已加载。
也许有人能够发现我错过的明显的东西......
@yuzukitsuru 感谢该驱动程序,但我之前已经尝试过但没有成功,它有很多问题(如果您在本文中引用 ov5647_mipi.c 驱动程序),例如:
#define SENSOR_NAME "ov5648_mipi"
#define V4L2_IDENT_SENSOR 0x5648
应该
#define SENSOR_NAME "ov5647_mipi"
#define V4L2_IDENT_SENSOR 0x5647
sensor_read(sd, 0x300A, &rdval);
SENSOR_ID |= rdval;
SENSOR_ID |= (rdval << 8);
sensor_read(sd, 0x300B, &rdval);
SENSOR_ID |= (rdval);
sensor_print("V4L2_IDENT_SENSOR = 0x%x\n", SENSOR_ID);
应该
data_type rdval, rdval2;
unsigned int SENSOR_ID = 0;
printk(KERN_WARNING "entering sensor_detect\n");
sensor_read(sd, CHIP_ID_ADDR, &rdval);
sensor_read(sd, CHIP_ID_ADDR_L, &rdval2);
SENSOR_ID = (rdval << 8) | rdval2;
sensor_print("V4L2_IDENT_SENSOR = 0x%x\n", SENSOR_ID);
static int sensor_init(struct v4l2_subdev *sd, u32 val)
{
int ret = 0;
struct sensor_info *info = to_state(sd);
printk(KERN_WARNING "entering sensor_init\n");
sensor_print("sensor_init\n");
sensor_power(sd, PWR_ON); //added
总体而言,这个驱动程序似乎是基于 OV5648.c 的,该驱动程序已经存在所有这些问题,您是否真的让它在某个时刻与 OV5647 一起工作,或者它只是一个草案?
@alb702 这个问题已经解决了,我只需要使用足够低的上拉电阻,并将DTS中I2C引脚的驱动强度设置为1,就可以正常工作了。 我的主要问题是驱动强度设置
@awwwwa 我知道 OV5647 不支持开箱即用,我想通过修改内核中已有的 OV5648 驱动程序来为其制作一个驱动程序。 我在驱动程序中仔细设置了 I2C 上每个必需的寄存器,其方式类似于 linux 内核 6.1 驱动程序处理它的方式(因为 linux 6.1 内置了 0V5647 驱动程序)。
我按照 allwinner 提供的在 tina-linux 下移植相机的指南进行操作,我的驱动程序成功加载、发送相机配置并正确报告。 mipi-csi 时钟和数据通道上也有活动(但它们太快了,我无法正确调试),这表明相机确实对其新配置做出了反应。
现在我当然可以选择支持更好的 GC 相机,但这不是目标,我正在尝试在这个平台上支持 rapsberry pi 1.3 相机。 我这样做是因为许多廉价模块都采用这种 15 针外形尺寸,但 GC 系列相机很难找到这种格式。
接下来我可能会尝试 IMX219(树莓派相机 V2),因为当前的 4.9 内核中已经有它的驱动程序,但目前 OV5647 仍然超时与camerademo,并且没有太多关于应该采取的行动过程的信息 在这种情况下,请参见 PDF 的常见问题解答。
您认为有什么东西可能会破坏我的 allwinner Eyesee 框架方面的驱动程序吗? 我还必须考虑硬件不兼容的可能性,并验证我猜的所有 mipi 逻辑级别...
@alb702 这是个好建议,我可能会这样做,因为传感器由于某种原因仍然没有发送其 mipi 帧......它至少会让调试更容易
我让它工作了,似乎驱动程序需要在启动时正确加载,否则 DTS 将传感器设置为“禁用”。
另一方面,我基于 ov5647 的 ov5648 官方 allwinner 驱动程序的寄存器似乎完全错误! 它是一个 mipi 驱动程序,它修改相机中与并行 csi 相关的寄存器,完全是废话......我正在从头开始重写它。
//these register maps are completely wrong, even for the ov5648 for which this driver was originally written
static struct regval_list sensor_qsxga_regs[] = {
/*2592x1944 15fps 2 lane MIPI 420Mbps/lane */
{0x0100, 0x00}, //start software sleep
{0x3501, 0x7b}, //exposure
{0x2502, 0x00}, //unknown?
{0x3708, 0x63}, //unknown?
{0x3709, 0x12}, //unknown?
{0x370c, 0xc0}, //unknown?
{0x3800, 0x00}, //TIMING_X_ADDR_START
{0x3801, 0x00}, //TIMING_X_ADDR_START
{0x3802, 0x00}, //TIMING_Y_ADDR_START
{0x3803, 0x00}, //TIMING_Y_ADDR_START
{0x3804, 0x0a}, //TIMING_X_ADDR_END
{0x3805, 0x3f}, //TIMING_X_ADDR_END
{0x3806, 0x07}, //TIMING_Y_ADDR_END
{0x3807, 0xa3}, //TIMING_Y_ADDR_END
{0x3808, 0x0a}, //TIMING_X_OUTPUT_SIZE
{0x3809, 0x20}, //TIMING_X_OUTPUT_SIZE
{0x380a, 0x07}, //TIMING_Y_OUTPUT_SIZE
{0x380b, 0x98}, //TIMING_Y_OUTPUT_SIZE
{0x380c, 0x0b}, //TIMING_HTS
{0x380d, 0x00}, //TIMING_HTS
{0x380e, 0x07}, //TIMING_VTS
{0x380f, 0xc0}, //TIMING_VTS
{0x3810, 0x00}, //TIMING_ISP_X_WIN
{0x3811, 0x10}, //TIMING_ISP_X_WIN
{0x3812, 0x00}, //TIMING_ISP_Y_WIN
{0x3813, 0x06}, //TIMING_ISP_Y_WIN
{0x3814, 0x11}, //TIMING_X_INC
{0x3815, 0x11}, //TIMING_Y_INC
//TIMING_HSYNCST is missing??
{0x3817, 0x00}, //TIMING_HSYNCST
{0x3820, 0x40}, //TIMING_TC_REG20
{0x3821, 0x06}, //TIMING_TC_REG21
{0x4004, 0x04}, //BLC CTRL04
{0x4005, 0x1a}, //BLC CTRL05
{0x350b, 0x40}, //AGC (gain)
{0x4837, 0x17}, //PCLK_PERIOD
{0x0100, 0x01}, //end software sleep
};