Rrkisp issue with CSI camera input.
I'm using kernel 4.19 from the repo shared by Shaggy013 user with some modifications in the imx219 camera driver to support extra modes. I have backported the dts from latest RC kernel so mostly everything is working (hw encoding etc.) However the picture I'm getting doesn't look right(very dark, when camera gain is raised it looks very green - other colors are present so it is not un-debayered, but there is an excess of green). It may be simply because I'm getting a raw unprocessed picture, or there is some problem. At the same time I have the following errors. Are those errors perhaps related? Maybe ISP is not doing some image processing? (or perhaps I haven't requested it yet). Either way please let me know what those errors mean if anyone knows.

Additionally I get those errors in dmesg:
[    0.886617] imx219 3-0010: driver version: 00.01.02
[    0.911298] imx219 3-0010: Model ID 0x0219, Lot ID 0x4c2015, Chip ID 0x066e
[    0.912483] iommu: Adding device fdfe0000.rkcif to group 7
[    0.912540] rkcifhw fdfe0000.rkcif: Linked as a consumer to fdfe0800.iommu
[    0.913203] rkcifhw fdfe0000.rkcif: can't request region for resource [mem 0xfdfe0000-0xfdfe7fff]
[    0.915928] iommu: Adding device fdff0000.rkisp to group 8
[    0.915984] rkisp_hw fdff0000.rkisp: Linked as a consumer to fdff1a00.iommu
[    0.916183] rkisp_hw fdff0000.rkisp: is_thunderboot: 0
[    0.916216] rkisp_hw fdff0000.rkisp: max input:0x0@0fps
[    0.916259] rkisp_hw fdff0000.rkisp: can't request region for resource [mem 0xfdff0000-0xfdffffff]
[    0.917220] rkisp rkisp-vir0: rkisp driver version: v01.07.00
[    0.917639] rkisp rkisp-vir0: Entity type for entity rkisp-isp-subdev was not initialized!
[    0.917681] rkisp rkisp-vir0: Entity type for entity rkisp-csi-subdev was not initialized!
[    0.919844] rockchip-csi2-dphy csi2-dphy1: dphy1 matches m01_f_imx219 3-0010:bus type 4
[    0.920677] rkisp-vir0: Async subdev notifier completed

Looking at the dtsi that has those devices(it is included from rk3568.dtsi - I know rk3568 is a different device, but the include statement is the same as in mainline so I assume those dts entries are common to rk3566 and rk3568, but mainline of course doesn't support rkisp etc yet so I'm using rk3568.dtsi from the BSP) it says:
(scroll to see the whole thing)
    rkisp: rkisp@fdff0000 {
        compatible = "rockchip,rk3568-rkisp";
        reg = <0x0 0xfdff0000 0x0 0x10000>;
        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
                 <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
                 <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "mipi_irq", "mi_irq", "isp_irq";
        clocks = <&cru ACLK_ISP>, <&cru HCLK_ISP>, <&cru CLK_ISP>;
        clock-names = "aclk_isp", "hclk_isp", "clk_isp";
        resets = <&cru SRST_ISP>, <&cru SRST_H_ISP>;
        reset-names = "isp", "isp-h";
        rockchip,grf = <&grf>;
        power-domains = <&power RK3568_PD_VI>;
        iommus = <&rkisp_mmu>;
        rockchip,iq-feature = /bits/ 64 <0x3FBFFFE67FF>;
        status = "disabled";

    rkisp_mmu: iommu@fdff1a00 {
        compatible = "rockchip,iommu-v2";
        reg = <0x0 0xfdff1a00 0x0 0x100>;
        interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "isp_mmu";
        clocks = <&cru ACLK_ISP>, <&cru HCLK_ISP>;
        clock-names = "aclk", "iface";
        power-domains = <&power RK3568_PD_VI>;
        #iommu-cells = <0>;
        status = "disabled";

and for the cif:
(scroll to see the whole thing)
    rkcif: rkcif@fdfe0000 {
        compatible = "rockchip,rk3568-cif";
        reg = <0x0 0xfdfe0000 0x0 0x8000>;
        reg-names = "cif_regs";
        interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "cif-intr";

        clocks = <&cru ACLK_VICAP>, <&cru HCLK_VICAP>,
             <&cru DCLK_VICAP>, <&cru ICLK_VICAP_G>;
        clock-names = "aclk_cif", "hclk_cif",
                  "dclk_cif", "iclk_cif_g";
        resets = <&cru SRST_A_VICAP>, <&cru SRST_H_VICAP>,
             <&cru SRST_D_VICAP>, <&cru SRST_P_VICAP>,
             <&cru SRST_I_VICAP>;
        reset-names = "rst_cif_a", "rst_cif_h",
                  "rst_cif_d", "rst_cif_p",
        assigned-clocks = <&cru DCLK_VICAP>;
        assigned-clock-rates = <300000000>;
        power-domains = <&power RK3568_PD_VI>;
        rockchip,grf = <&grf>;
        iommus = <&rkcif_mmu>;
        status = "disabled";

    rkcif_mmu: iommu@fdfe0800 {
        compatible = "rockchip,iommu-v2";
        reg = <0x0 0xfdfe0800 0x0 0x100>;
        interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "cif_mmu";
        clocks = <&cru ACLK_VICAP>, <&cru HCLK_VICAP>;
        clock-names = "aclk", "iface";
        power-domains = <&power RK3568_PD_VI>;
        #iommu-cells = <0>;
        status = "disabled";

Also I have no other devices occupying those memory regions. I checked in /proc/ here is the excerpt:
fdeb0000-fdeb0fff : rk_rga@fdeb0000
fded0480-fded04bf : iommu@fded0480
fdee0800-fdee083f : iommu@fdee0800
fdef0800-fdef08ff : iommu@fdef0800
fdf40f00-fdf40f3f : iommu@fdf40f00
fdf40f40-fdf40f7f : iommu@fdf40f00
fdf80800-fdf8083f : iommu@fdf80800
fdf80840-fdf8087f : iommu@fdf80800
fdfe0800-fdfe08ff : iommu@fdfe0800
fdff1a00-fdff1aff : iommu@fdff1a00
fe010000-fe01ffff : ethernet@fe010000

So before I try using rkisp programmatically I would like to find out if I'm having some problem with it?

Possibly Related Threads…
Thread Author Replies Views Last Post
  Ov5647 camera attached via csi to Quartz64 /Soquartz Randomuser 0 108 07-21-2022, 01:08 PM
Last Post: Randomuser

Forum Jump:

Users browsing this thread: 1 Guest(s)