基于RK3568 XS9922调试

RK3568 XS9922调试

内核的DTS配置

&i2c2 {
	clock-frequency = <200000>;

	xs9922: xs9922@30 {
		status = "okay";
		compatible = "xs9922";
		reg = <0x30>;
		clocks = <&cru 214>;
		clock-names = "xvclk";
		power-domains = <&power 8>;
		pinctrl-names = "default";
		pinctrl-0 = <&cif_clk>;
		reset-gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
		power-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
		camera-gpios = <&gpio4 18 0>;
		rockchip,camera-module-index = <1>;
		rockchip,camera-module-name = "xs9922";
		rockchip,camera-module-lens-name = "xs9922";

		port {
			xs9922_ucam_out: endpoint {
				remote-endpoint = <&xs9922_mipi_in_ucam>;
				data-lanes = <1 2 3 4>;
			};
		};
 	};

};

&combphy0_us {
	status = "okay";
};

&combphy1_usq {
	status = "okay";
};

&combphy2_psq {
	status = "okay";
};


&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>;

			xs9922_mipi_in_ucam: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&xs9922_ucam_out>;
				data-lanes = <1 2 3 4>;
			};
		};

		port@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			xs9922_csi2dphy_out: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&xs9922_mipi_csi2_input>;
				data-lanes = <1 2 3 4>;
			};
		};
	};
};


&mipi_csi2 {
	status = "okay";

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			xs9922_mipi_csi2_input: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&xs9922_csi2dphy_out>;
				data-lanes = <1 2 3 4>;
			};
		};

		port@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			mipi_csi2_output: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&cif_mipi_in>;
				data-lanes = <1 2 3 4>;
			};
		};
	};
};




&rkcif_mipi_lvds {
	status = "okay";

	port {
		cif_mipi_in: endpoint {
			remote-endpoint = <&mipi_csi2_output>;
			data-lanes = <1 2 3 4>;
		};
	};
};





&reserved_memory {
	cif_reserved: vicap@80000000 {
		compatible = "shared-dma-pool";
		inactive;
		reusable;
		reg = <0x0 0x40000000 0x0 0x10000000>; //1G ~ 1G+256MB
		//reg = <0x0 0x60000000 0x0 0x8000000>; //1.5G ~ 1.5G+128MB
	};
};
&rkcif {
	status = "okay";
	memory-region = <&cif_reserved>;
};

&rkcif_mmu {
	status = "okay";
};

&rkisp_vir0 {
        status = "disabled";
 
        port {
                #address-cells = <1>;
                #size-cells = <0>;
 
                isp0_vir0: endpoint@0 {
                        reg = <0>;
                        remote-endpoint = <&mipi_lvds_sditf>;
                };
        };
};
&rkcif_mipi_lvds_sditf {
        status = "disabled";
 
        port {
                mipi_lvds_sditf: endpoint {
                        remote-endpoint = <&isp0_vir0>;
                };
        };
};
 

 
&rkisp {
        status = "disabled";
};
 
&rkisp_mmu {
        status = "disabled";
};
 

1. xs9922 是I2c设备,所以第一步确认i2c通信是否正常
可以通过回读chip id log:
chip_id : 0x9922
说明i2c 通信正常

xs9922_read_reg(client, NI_40F0_DEVICE_ID_1, XS9922_REG_VALUE_08BIT, &chip_id1);
xs9922_read_reg(client, NI_40F1_DEVICE_ID_0, XS9922_REG_VALUE_08BIT, &chip_id0);

[ 1.033027] xs9922 2-0030: chip_id : 0x9922
[ 1.033227] input: xs9922_input_event as /devices/platform/fe5b0000.i2c/i2c-2/2-0030/input/input1
[ 1.033612] xs9922 2-0030: xs9922_probe run here
[ 1.033614] __xs9922_init in \x0a=======================================================\x0a\x0a
[ 1.034063] xs9922_write_reg xs9922 write reg(0x4200) : 0x3f!
[ 1.034075] xs9922_write_array xs9922 write reg(0x4200) : 0x3f!
[ 1.034445] iommu: Adding device fdfe0000.rkcif to group 7
[ 1.034482] rkcifhw fdfe0000.rkcif: Linked as a consumer to fdfe0800.iommu
[ 1.034512] xs9922_wri

  • 31
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不负时光年华

你的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值