问题如下图log日志中截取部分: i2c读取不到rk628d 核心板:core-3568j 行业版:aio-3568j 所驱动芯片:瑞芯微rk628d 步骤: 1.kernel config配置 2.dts配置 修改的dts为rk3568-firefly-aioj.dts 硬件连接如下: i2c采用ic4(位于mipi_csi中),中断采用tp端子中的int脚,复位采用tp端子中的res脚。 连接如图:(rk628的开发板i2c要单独接出来,采用常供电) 参考连接(rk官方提供的连接方法): dts代码如下:其中部分代码参考子rk官方提供的节点配置以及安卓内核中部分其他主板的rk628驱动dts // SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2020 Rockchip Electronics Co., Ltd. * */ #include "rk3568-firefly-aioj.dtsi" /* * Select one of the three * using single camera xc7160 ----> rk3568-firefly-aioj-cam-8ms1m.dtsi * using dual camera gc2053/gc2093 ----> rk3568-firefly-aioj-cam-2ms2m.dtsi * using hdmi-in module rk628d ----> rk3568-firefly-aioj-tf-hdmi-mipi-rk628.dtsi */ #include "rk3568-firefly-aioj-cam-8ms1m.dtsi" //#include "rk3568-firefly-aioj-cam-2ms2m.dtsi" //#include "rk3568-firefly-aioj-tf-hdmi-mipi-rk628.dtsi" / { model = "AIO-3568J HDMI (Android)"; compatible = "rockchip,rk3568-firefly-aioj", "rockchip,rk3568"; }; &route_hdmi { status = "okay"; connect = <&vp0_out_hdmi>; }; &i2c4{ clock-frequency = <400000>; status = "okay"; rk628: rk628@50{ reg = <0x50>; interrupt-parent = <&gpio3>; interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>; reset-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; status = "okay"; }; }; #include <arm/rk628.dtsi> &rk628_combtxphy{ status = "okay"; }; &rk628_combrxphy{ status = "okay"; }; &rk628_csi { status = "okay"; /** If the hpd output level is inverted on the circuit, * the following configuration needs to be enabled. */ /* hpd-output-inverted; */ plugin-det-gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>; // //power-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; rockchip,camera-module-index = <0>; rockchip,camera-module-facing = "back"; rockchip,camera-module-name = "RK628-CSI"; rockchip,camera-module-lens-name = "NC"; port { hdmiin_out0: endpoint { remote-endpoint = <&mipi_in>; data-lanes = <1 2 3 4>; }; }; }; &csi2_dphy_hw { status = "okay"; }; &csi2_dphy0 { status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; mipi_in: endpoint@0 { reg = <0>; remote-endpoint = <&hdmiin_out0>; data-lanes = <1 2 3 4>; }; }; port@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; csidphy0_out: endpoint@0 { reg = <0>; remote-endpoint = <&isp0_in>; }; }; }; }; &rkisp { status = "okay"; }; &rkisp_mmu { status = "okay"; }; &rkisp_vir0 { status = "okay"; port { #address-cells = <1>; #size-cells = <0>; isp0_in: endpoint@0 { reg = <0>; remote-endpoint = <&csidphy0_out>; }; }; }; 编译结果: log中i2c读取不到设备,返回错误码6. 已确定: 1.i2c地址设置没有问题, 2.硬件连接没有问题,3568与rk628的i2c相连,rk628供电正常,上电后芯片发热,系统开机是3568会给628d输入一个拉高的边沿脉冲,即供电和置为ok。FPC连接没有问题。 3.考虑过是否是dts中时序的问题,对dts中clock-frequency进行过修改,400000,40000,10000等时序都尝试过,依旧注册不上。 萌新求助 == |
-
1648555758(1).png (37.29 KB, 下载次数: 996)
-
54629f8cc569ebe882075f162581a64.jpg (112.18 KB, 下载次数: 1028)
-
a8e1f99327108e51f30b71b35dd7239.jpg (128.78 KB, 下载次数: 1057)
-
27.82 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1