当前位置: 首页 > news >正文

全志D1-H (MQ-Pro)驱动 OV5640 摄像头

在这里插入图片描述

内核配置

运行 m kernel_menuconfig 勾选下列驱动

Device Drivers  ---><*> Multimedia support  --->[*]   V4L platform devices  ---><*>   Video Multiplexer[*]   SUNXI platform devices  ---><*>   sunxi video input (camera csi/mipi isp vipp)driver<M>     v4l2 new driver for SUNXI<*>     use cci functionselect cci or cci to twi (chenge cci to twi)  --->[*]     use IOMMU for memery alloc[*]     ISP WDR module[*]     sensor same i2c addrsensor driver select  ---><M> use ov5640 driver[*]   Memory-to-memory multimedia devices  ---><*>   Deinterlace support<*>   SuperH VEU mem2mem video processing driver

设备树配置

路径:lichee/linux-5.4/arch/riscv/boot/dts/sunxi/sun20iw1p1.dtsi

		vind0: vind@5800800 {compatible = "allwinner,sunxi-vin-media", "simple-bus";#address-cells = <2>;#size-cells = <2>;ranges;device_id = <0>;csi_top = <336000000>;csi_isp = <327000000>;reg = <0x0 0x05800800 0x0 0x200>,<0x0 0x05800000 0x0 0x800>;clocks = <&ccu CLK_CSI_TOP>, <&ccu CLK_PLL_VIDEO1_2X>,<&ccu CLK_CSI0_MCLK>, <&dcxo24M>, <&ccu CLK_PLL_VIDEO1>,<&ccu CLK_BUS_CSI>, <&ccu CLK_MBUS_CSI>;clock-names = "csi_top", "csi_top_src","csi_mclk0", "csi_mclk0_24m", "csi_mclk0_pll","csi_bus", "csi_mbus";resets = <&ccu RST_BUS_CSI>;reset-names = "csi_ret";pinctrl-names = "mclk0-default", "mclk0-sleep";pinctrl-0 = <&csi_mclk0_pins_a>;pinctrl-1 = <&csi_mclk0_pins_b>;status = "okay";csi0: csi@5801000{compatible = "allwinner,sunxi-csi";reg = <0x0 0x05801000 0x0 0x1000>;interrupts-extended = <&plic0 116 IRQ_TYPE_LEVEL_HIGH>;pinctrl-names = "default","sleep";pinctrl-0 = <&csi0_pins_a>;pinctrl-1 = <&csi0_pins_b>;device_id = <0>;iommus = <&mmu_aw 1 1>;status = "okay";};isp0: isp@5809410 {compatible = "allwinner,sunxi-isp";reg = <0x0 0x05809410 0x0 0x10>;device_id = <0xfe>;status = "okay";};isp1: isp@5809420 {compatible = "allwinner,sunxi-isp";reg = <0x0 0x05809420 0x0 0x10>;device_id = <0xff>;status = "okay";};scaler0: scaler@5809430 {compatible = "allwinner,sunxi-scaler";reg = <0x0 0x05809430 0x0 0x10>;device_id = <0xfe>;status = "okay";};scaler1: scaler@5809440 {compatible = "allwinner,sunxi-scaler";reg = <0x0 0x05809440 0x0 0x10>;device_id = <0xff>;status = "okay";};actuator0: actuator@5809450 {compatible = "allwinner,sunxi-actuator";device_type = "actuator0";reg = <0x0 0x05809450 0x0 0x10>;actuator0_name = "ad5820_act";actuator0_slave = <0x18>;actuator0_af_pwdn = <>;actuator0_afvdd = "afvcc-csi";actuator0_afvdd_vol = <2800000>;status = "okay";};flash0: flash@5809460 {device_type = "flash0";compatible = "allwinner,sunxi-flash";reg = <0x0 0x05809460 0x0 0x10>;flash0_type = <2>;flash0_en = <>;flash0_mode = <>;flash0_flvdd = "";flash0_flvdd_vol = <>;device_id = <0>;status = "okay";};sensor0: sensor@5809470 {reg = <0x0 0x05809470 0x0 0x10>;device_type = "sensor0";compatible = "allwinner,sunxi-sensor";sensor0_mname = "ov5640";sensor0_twi_cci_id = <2>;sensor0_twi_addr = <0x78>;sensor0_mclk_id = <0>;sensor0_pos = "rear";sensor0_isp_used = <0>;sensor0_fmt = <0>;sensor0_stby_mode = <0>;sensor0_vflip = <0>;sensor0_hflip = <0>;sensor0_iovdd-supply = <>;sensor0_iovdd_vol = <>;sensor0_avdd-supply = <>;sensor0_avdd_vol = <>;sensor0_dvdd-supply = <>;sensor0_dvdd_vol = <>;sensor0_power_en = <>;sensor0_reset = <&pio PE 14 GPIO_ACTIVE_LOW>;sensor0_pwdn = <&pio PE 15 GPIO_ACTIVE_LOW>;sensor0_sm_vs = <>;flash_handle = <&flash0>;act_handle = <&actuator0>;device_id = <0>;status	= "okay";};sensor1: sensor@5809480 {reg = <0x0 0x05809480 0x0 0x10>;device_type = "sensor1";compatible = "allwinner,sunxi-sensor";sensor1_mname = "ov5647";sensor1_twi_cci_id = <3>;sensor1_twi_addr = <0x6c>;sensor1_mclk_id = <1>;sensor1_pos = "front";sensor1_isp_used = <0>;sensor1_fmt = <0>;sensor1_stby_mode = <0>;sensor1_vflip = <0>;sensor1_hflip = <0>;sensor1_iovdd-supply = <>;sensor1_iovdd_vol = <>;sensor1_avdd-supply = <>;sensor1_avdd_vol = <>;sensor1_dvdd-supply = <>;sensor1_dvdd_vol = <>;sensor1_power_en = <>;sensor1_reset = <&pio PE 7 GPIO_ACTIVE_LOW>;sensor1_pwdn = <&pio PE 6 GPIO_ACTIVE_LOW>;sensor1_sm_vs = <>;flash_handle = <>;act_handle = <>;device_id = <1>;status	= "disabled";};vinc0: vinc@5809000 {compatible = "allwinner,sunxi-vin-core";device_type = "vinc0";reg = <0x0 0x05809000 0x0 0x200>;interrupts-extended = <&plic0 111 IRQ_TYPE_LEVEL_HIGH>;vinc0_csi_sel = <0>;vinc0_mipi_sel = <0xff>;vinc0_isp_sel = <0>;vinc0_tdm_rx_sel = <0xff>;vinc0_rear_sensor_sel = <0>;vinc0_front_sensor_sel = <0>;vinc0_sensor_list = <0>;device_id = <0>;iommus = <&mmu_aw 1 1>;status = "okay";};vinc1: vinc@5809200 {device_type = "vinc1";compatible = "allwinner,sunxi-vin-core";reg = <0x0 0x05809200 0x0 0x200>;interrupts-extended = <&plic0 112 IRQ_TYPE_LEVEL_HIGH>;vinc1_csi_sel = <0>;vinc1_mipi_sel = <0xff>;vinc1_isp_sel = <1>;vinc1_tdm_rx_sel = <0xff>;vinc1_rear_sensor_sel = <0>;vinc1_front_sensor_sel = <0>;vinc1_sensor_list = <0>;device_id = <1>;iommus = <&mmu_aw 1 1>;status = "disabled";};};

在这里插入图片描述

ROOTFS 配置

运行 m menuconfig,勾选 <*> kmod-sunxi-vin......................................... sunxi-vin support

在这里插入图片描述

常见错误

[VIN_ERR]media_entity_find_link null

驱动版本不匹配所致,目前SDK分支过多驱动版本过多,用下列驱动替换即可:
sunxi-vin.tar.gz

解压,覆盖到 tina-d1-h/lichee/linux-5.4/drivers/media/platform/sunxi-vin 文件夹

测试固件

tina_d1-h-mq_pro_uart0.zip

在这里插入图片描述

原贴链接:https://bbs.aw-ol.com/topic/4017/
资源获取、问题讨论可以到全志在线开发者社区进行:https://www.aw-ol.com
全志及开发者最新动态可以关注全志在线微信公众号

http://www.lryc.cn/news/113095.html

相关文章:

  • 2023下半年软考初级网络管理员报名入口-报名流程-备考方法
  • QEMU源码全解析29 —— QOM介绍(18)
  • 从入门到精通——【初识网络】
  • MySQL alter命令修改表详解
  • Vulnhub: ColddWorld: Immersion靶机
  • Redis 总结【6.0版本的】
  • 状态模式(C++)
  • 承泰科技Q3再获30多个智驾项目,新增订单0.86亿!累计近11亿!
  • 以太网Ethernet通信协议
  • 内网横向移动—资源约束委派
  • Spring Boot Logback日志格式改为JSON
  • Linux 块设备操作函数
  • linux c++网络编程基础:服务端与客户端的实现
  • 坐标转换-使用geotools读取和转换地理空间表的坐标系(sqlserver、postgresql)
  • JavaScript的主要应用场景有哪些?请描述一下JavaScript的基本数据类型和引用数据类型分别是哪些?
  • webpack性能优化
  • 保存和读取带有透明通道的视频
  • bilibili的评论ip属地显示未知
  • [BabysqliV3.0]phar反序列化
  • 数据库架构演变过程
  • webpack 静态模块打包工具
  • 万界星空科技/免费开源MES系统/免费仓库管理
  • 【暑期每日一练】 Epilogue
  • Go微服务实践 - Rpc核心概念理解
  • Effective Java笔记(27)消除非受检的警告
  • Dapper
  • Python基础知识(一)
  • QTthreadPool 程序
  • python注册机制Registry
  • 【Megatron-DeepSpeed】张量并行工具代码mpu详解(三):张量并行层的实现及测试