hi,
I want use AHD chip, nvp6324 or tp2815, In imx8 mipi csi0,How to configure the device tree。
/*add by shl*/
#if 1
&i2c_mipi_csi0 {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c_mipi_csi0>;
clock-frequency = <100000>;
status = "okay";
//7bit addr
nvp6324_mipi@30 {
compatible = "nextchip,nvp6324_mipi";
reg = <0x30>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mipi_csi0>;
clocks = <&clk_dummy>;
clock-names = "capture_mclk";
mclk = <27000000>;
mclk_source = <0>;
virtual-channel;
pwn-gpios = <&lsio_gpio3 8 GPIO_ACTIVE_HIGH>;
status = "okay";
port {
nvp6324_0_ep: endpoint {
remote-endpoint = <&mipi_csi0_ep>;
data-lanes = <1 2 3 4>;
};
};
};
//7bit addr
tp2815_mipi@44 {
compatible = "techpoint,tp2815_mipi";
reg = <0x44>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mipi_csi0>;
clocks = <&clk_dummy>;
clock-names = "capture_mclk";
mclk = <27000000>;
mclk_source = <0>;
virtual-channel;
irq-gpios = <&lsio_gpio3 7 GPIO_ACTIVE_HIGH>;
pwn-gpios = <&lsio_gpio3 8 GPIO_ACTIVE_HIGH>;
status = "disabled";
port {
tp2815_0_ep: endpoint {
remote-endpoint = <&mipi_csi0_ep>;
data-lanes = <1 2 3 4>;
};
};
};
/delete-node/ max9286_mipi@6a;
};
&mipi_csi_0 {
#address-cells = <1>;
#size-cells = <0>;
virtual-channel;
status = "okay";
/* Camera 0 MIPI CSI-2 (CSIS0) tp2815_0_ep nvp6324_0_ep*/
port@0 {
reg = <0>;
mipi_csi0_ep: endpoint {
remote-endpoint = <&nvp6324_0_ep>;
data-lanes = <1 2 3 4>;
};
};
/*
port@1 {
reg = <1>;
mipi_csi0_ep: endpoint {
remote-endpoint = <&nvp6324_0_ep>;
data-lanes = <1 2 3 4>;
};
};
*/
};
#endif
Thanks
Hi Hongliang
for using both nvp6324 and tp2815 it is necessary to use two mipi-csi ports as in example
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Nvp6324-driver-for-imx8qm/ta-p/1114616
Best regards
igor
HI
What I mean is that it is compatible with tp2815 and nvp6324 on CSI0. In fact, only one chip is used at a time. With a mirroring code, it can be compatible with two chips and automatically identify and load the driver.
thanks