Toybrick

rk3588使用 imx415和调试串口

lrzss

注册会员

积分
133
楼主
发表于 2023-7-20 17:30:52    查看: 1280|回复: 0 | [复制链接]    打印 | 只看该作者
请问,rk3588的板子,要使用imx415摄像头和调试串口,要怎么搞?
如在/kernel/linux-5.10/arch/arm64/boot/rockchip/rk3588-toybrick-x0.dtsi中添加
&uart5 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&uart5m0_xfer &uart5m0_ctsn>;
};

可以使用uart5串口, 但不知为什么没有调试串口,用原封不动的SDK编译出来的kernel镜像也没有调试串口,请问怎么把调试串口搞出来?

另外我要用imx415的摄像头,编写的dtsi文件如下,编译后,用命令:grep imx415 /sys/class/video4linux/v*/name   查不到imx415 ,请问要怎么编写imx415的dtsi文件(或怎么才能用imx415摄像头)?
&csi2_dphy0_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_ucam0: endpoint@1 {
                                reg = <1>;
                                remote-endpoint = <&ucam_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 = <&mipi2_csi2_input>;
                        };
                };
        };
};

&i2c3 {
        status = "okay";
        dw9714: dw9714@c {
                compatible = "silicon touch,dw9714";
                status = "okay";
                reg = <0x0c>;
                rockchip,camera-module-index = <0>;
                rockchip,camera-module-facing = "back";
                rockchip,vcm-start-current = <20>;
                rockchip,vcm-rated-current = <120>;
                rockchip,vcm-step-mode = <13>;
        };

        imx415_eeprom: imx415_eeprom@50 {
                compatible = "otp,imx415_eeprom";
                status = "okay";
                reg = <0x50>;
        };

        imx415: imx415@10 {
                compatible = "sony,imx415";
                reg = <0x10>;
                clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
                clock-names = "xvclk";
                pinctrl-names = "default";
                pinctrl-0 = <&mipim0_camera3_clk>;
                power-domains = <&power RK3588_PD_VI>;
                avdd-supply = <&vcc_mipicsi0>;
                pwdn-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
                reset-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
                rockchip,camera-module-index = <0>;
                rockchip,camera-module-facing = "back";
                rockchip,camera-module-name = "GEIR180089";
                rockchip,camera-module-lens-name = "LG500627G";
                eeprom-ctrl = <&imx415_eeprom>;
                lens-focus = <&dw9714>;
                port {
                        ucam_out0: endpoint {
                                remote-endpoint = <&mipi_in_ucam0>;
                                data-lanes = <1 2 3 4>;
                        };
                };
        };
};

&mipi2_csi2 {
        status = "okay";
        ports {
                #address-cells = <1>;
                #size-cells = <0>;
                port@0 {
                        reg = <0>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        mipi2_csi2_input: endpoint@1 {
                                reg = <1>;
                                remote-endpoint = <&csidphy0_out>;
                        };
                };
                port@1 {
                        reg = <1>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        mipi2_csi2_output: endpoint@0 {
                                reg = <0>;
                                remote-endpoint = <&cif_mipi_in2>;
                        };
                };
        };
};

&rkcif {
        status = "okay";
};

&rkcif_mipi_lvds2 {
        status = "okay";
        port {
                cif_mipi_in2: endpoint {
                        remote-endpoint = <&mipi2_csi2_output>;
                };
        };
};

&rkcif_mipi_lvds2_sditf {
        status = "okay";
        port {
                mipi_lvds_sditf: endpoint {
                        remote-endpoint = <&isp0_vir0>;
                };
        };
};

&rkcif_mmu {
        status = "okay";
};

&rkisp0 {
        status = "okay";
};

&isp0_mmu {
        status = "okay";
};

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

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表