v4l2: ISP update init reg config
authorliuxl0327 <liuxl0327@starfivetech.com>
Mon, 21 Mar 2022 10:23:46 +0000 (18:23 +0800)
committermason.huo <mason.huo@starfivetech.com>
Fri, 1 Jul 2022 07:05:38 +0000 (15:05 +0800)
Signed-off-by: mason.huo <mason.huo@starfivetech.com>
drivers/media/platform/starfive/v4l2_driver/stf_isp.c
drivers/media/platform/starfive/v4l2_driver/stf_isp_hw_ops.c

index 73266aa..8e886b3 100644 (file)
@@ -1392,11 +1392,6 @@ int stf_isp_register(struct stf_isp_dev *isp_dev,
                goto free_ctrls;
        }
 
-       if (isp_dev->id == 0)
-               stf_isp_load_setfile(isp_dev, STF_ISP0_SETFILE);
-       else
-               stf_isp_load_setfile(isp_dev, STF_ISP1_SETFILE);
-
        return 0;
 
 free_ctrls:
index 1efc674..2371d55 100644 (file)
 #include <linux/module.h>
 #include <video/stf-vin.h>
 #include "stf_isp_ioctl.h"
+#include "stf_isp.h"
 #include <linux/delay.h>
+#include <linux/clk.h>
+#define USE_NEW_CONFIG_SETTING
 
-static const struct regval_t isp_sc2235_reg_config_list[] = {
-       {0x00000014, 0x0000000c, 0, 0},
-//     {0x00000018, 0x000011BB, 0, 0},
+static const struct regval_t isp_reg_init_config_list[] = {
+       /* config DC(0040H~0044H) */
+       {0x00000044, 0x00000000, 0, 0},
+       /* config DEC(0030H) */
+       {0x00000030, 0x00000000, 0, 0},
+       /* config OBC(0034H, 02E0H~02FCH) */
+       {0x00000034, 0x000000BB, 0, 0},
+       {0x000002E0, 0x40404040, 0, 0},
+       {0x000002E4, 0x40404040, 0, 0},
+       {0x000002E8, 0x40404040, 0, 0},
+       {0x000002EC, 0x40404040, 0, 0},
+       {0x000002F0, 0x00000000, 0, 0},
+       {0x000002F4, 0x00000000, 0, 0},
+       {0x000002F8, 0x00000000, 0, 0},
+       {0x000002FC, 0x00000000, 0, 0},
+       /* config LCBQ(0074H, 007CH, 0300H~039FH, and 0400H~049FH) */
+       {0x00000074, 0x00009900, 0, 0},
+       {0x0000007C, 0x01E40040, 0, 0},
+       {0x00000300, 0x01000100, 0, 0},
+       {0x00000304, 0x01000100, 0, 0},
+       {0x00000308, 0x01000100, 0, 0},
+       {0x0000030C, 0x01000100, 0, 0},
+       {0x00000310, 0x01000100, 0, 0},
+       {0x00000314, 0x01000100, 0, 0},
+       {0x00000318, 0x01000100, 0, 0},
+       {0x0000031C, 0x01000100, 0, 0},
+       {0x00000320, 0x01000100, 0, 0},
+       {0x00000324, 0x01000100, 0, 0},
+       {0x00000328, 0x01000100, 0, 0},
+       {0x0000032C, 0x01000100, 0, 0},
+       {0x00000330, 0x00000100, 0, 0},
+       {0x00000334, 0x01000100, 0, 0},
+       {0x00000338, 0x01000100, 0, 0},
+       {0x0000033C, 0x01000100, 0, 0},
+       {0x00000340, 0x01000100, 0, 0},
+       {0x00000344, 0x01000100, 0, 0},
+       {0x00000348, 0x01000100, 0, 0},
+       {0x0000034C, 0x01000100, 0, 0},
+       {0x00000350, 0x01000100, 0, 0},
+       {0x00000354, 0x01000100, 0, 0},
+       {0x00000358, 0x01000100, 0, 0},
+       {0x0000035C, 0x01000100, 0, 0},
+       {0x00000360, 0x01000100, 0, 0},
+       {0x00000364, 0x00000100, 0, 0},
+       {0x00000368, 0x01000100, 0, 0},
+       {0x0000036C, 0x01000100, 0, 0},
+       {0x00000370, 0x01000100, 0, 0},
+       {0x00000374, 0x01000100, 0, 0},
+       {0x00000378, 0x01000100, 0, 0},
+       {0x0000037C, 0x01000100, 0, 0},
+       {0x00000380, 0x01000100, 0, 0},
+       {0x00000384, 0x01000100, 0, 0},
+       {0x00000388, 0x01000100, 0, 0},
+       {0x0000038C, 0x01000100, 0, 0},
+       {0x00000390, 0x01000100, 0, 0},
+       {0x00000394, 0x01000100, 0, 0},
+       {0x00000398, 0x00000100, 0, 0},
+       {0x0000039C, 0x01000100, 0, 0},
+       {0x000003A0, 0x01000100, 0, 0},
+       {0x000003A4, 0x01000100, 0, 0},
+       {0x000003A8, 0x01000100, 0, 0},
+       {0x000003AC, 0x01000100, 0, 0},
+       {0x000003B0, 0x01000100, 0, 0},
+       {0x000003B4, 0x01000100, 0, 0},
+       {0x000003B8, 0x01000100, 0, 0},
+       {0x000003BC, 0x01000100, 0, 0},
+       {0x000003C0, 0x01000100, 0, 0},
+       {0x000003C4, 0x01000100, 0, 0},
+       {0x000003C8, 0x01000100, 0, 0},
+       {0x000003CC, 0x00000100, 0, 0},
+       {0x00000400, 0x00000000, 0, 0},
+       {0x00000404, 0x00000000, 0, 0},
+       {0x00000408, 0x00000000, 0, 0},
+       {0x0000040C, 0x00000000, 0, 0},
+       {0x00000410, 0x00000000, 0, 0},
+       {0x00000414, 0x00000000, 0, 0},
+       {0x00000418, 0x00000000, 0, 0},
+       {0x0000041C, 0x00000000, 0, 0},
+       {0x00000420, 0x00000000, 0, 0},
+       {0x00000424, 0x00000000, 0, 0},
+       {0x00000428, 0x00000000, 0, 0},
+       {0x0000042C, 0x00000000, 0, 0},
+       {0x00000430, 0x00000000, 0, 0},
+       {0x00000434, 0x00000000, 0, 0},
+       {0x00000438, 0x00000000, 0, 0},
+       {0x0000043C, 0x00000000, 0, 0},
+       {0x00000440, 0x00000000, 0, 0},
+       {0x00000444, 0x00000000, 0, 0},
+       {0x00000448, 0x00000000, 0, 0},
+       {0x0000044C, 0x00000000, 0, 0},
+       {0x00000450, 0x00000000, 0, 0},
+       {0x00000454, 0x00000000, 0, 0},
+       {0x00000458, 0x00000000, 0, 0},
+       {0x0000045C, 0x00000000, 0, 0},
+       {0x00000460, 0x00000000, 0, 0},
+       {0x00000464, 0x00000000, 0, 0},
+       {0x00000468, 0x00000000, 0, 0},
+       {0x0000046C, 0x00000000, 0, 0},
+       {0x00000470, 0x00000000, 0, 0},
+       {0x00000474, 0x00000000, 0, 0},
+       {0x00000478, 0x00000000, 0, 0},
+       {0x0000047C, 0x00000000, 0, 0},
+       {0x00000480, 0x00000000, 0, 0},
+       {0x00000484, 0x00000000, 0, 0},
+       {0x00000488, 0x00000000, 0, 0},
+       {0x0000048C, 0x00000000, 0, 0},
+       {0x00000490, 0x00000000, 0, 0},
+       {0x00000494, 0x00000000, 0, 0},
+       {0x00000498, 0x00000000, 0, 0},
+       {0x0000049C, 0x00000000, 0, 0},
+       {0x000004A0, 0x00000000, 0, 0},
+       {0x000004A4, 0x00000000, 0, 0},
+       {0x000004A8, 0x00000000, 0, 0},
+       {0x000004AC, 0x00000000, 0, 0},
+       {0x000004B0, 0x00000000, 0, 0},
+       {0x000004B4, 0x00000000, 0, 0},
+       {0x000004B8, 0x00000000, 0, 0},
+       {0x000004BC, 0x00000000, 0, 0},
+       {0x000004C0, 0x00000000, 0, 0},
+       {0x000004C4, 0x00000000, 0, 0},
+       {0x000004C8, 0x00000000, 0, 0},
+       {0x000004CC, 0x00000000, 0, 0},
+       /* config OECF(0100H~027CH) */
+       {0x00000100, 0x00100000, 0, 0},
+       {0x00000104, 0x00400020, 0, 0},
+       {0x00000108, 0x00800060, 0, 0},
+       {0x0000010C, 0x00C000A0, 0, 0},
+       {0x00000110, 0x010000E0, 0, 0},
+       {0x00000114, 0x02000180, 0, 0},
+       {0x00000118, 0x03000280, 0, 0},
+       {0x0000011C, 0x03FE0380, 0, 0},
+       {0x00000120, 0x00100000, 0, 0},
+       {0x00000124, 0x00400020, 0, 0},
+       {0x00000128, 0x00800060, 0, 0},
+       {0x0000012C, 0x00C000A0, 0, 0},
+       {0x00000130, 0x010000E0, 0, 0},
+       {0x00000134, 0x02000180, 0, 0},
+       {0x00000138, 0x03000280, 0, 0},
+       {0x0000013C, 0x03FE0380, 0, 0},
+       {0x00000140, 0x00100000, 0, 0},
+       {0x00000144, 0x00400020, 0, 0},
+       {0x00000148, 0x00800060, 0, 0},
+       {0x0000014C, 0x00C000A0, 0, 0},
+       {0x00000150, 0x010000E0, 0, 0},
+       {0x00000154, 0x02000180, 0, 0},
+       {0x00000158, 0x03000280, 0, 0},
+       {0x0000015C, 0x03FE0380, 0, 0},
+       {0x00000160, 0x00100000, 0, 0},
+       {0x00000164, 0x00400020, 0, 0},
+       {0x00000168, 0x00800060, 0, 0},
+       {0x0000016C, 0x00C000A0, 0, 0},
+       {0x00000170, 0x010000E0, 0, 0},
+       {0x00000174, 0x02000180, 0, 0},
+       {0x00000178, 0x03000280, 0, 0},
+       {0x0000017C, 0x03FE0380, 0, 0},
+       {0x00000180, 0x00100000, 0, 0},
+       {0x00000184, 0x00400020, 0, 0},
+       {0x00000188, 0x00800060, 0, 0},
+       {0x0000018C, 0x00C000A0, 0, 0},
+       {0x00000190, 0x010000E0, 0, 0},
+       {0x00000194, 0x02000180, 0, 0},
+       {0x00000198, 0x03000280, 0, 0},
+       {0x0000019C, 0x03FE0380, 0, 0},
+       {0x000001A0, 0x00100000, 0, 0},
+       {0x000001A4, 0x00400020, 0, 0},
+       {0x000001A8, 0x00800060, 0, 0},
+       {0x000001AC, 0x00C000A0, 0, 0},
+       {0x000001B0, 0x010000E0, 0, 0},
+       {0x000001B4, 0x02000180, 0, 0},
+       {0x000001B8, 0x03000280, 0, 0},
+       {0x000001BC, 0x03FE0380, 0, 0},
+       {0x000001C0, 0x00100000, 0, 0},
+       {0x000001C4, 0x00400020, 0, 0},
+       {0x000001C8, 0x00800060, 0, 0},
+       {0x000001CC, 0x00C000A0, 0, 0},
+       {0x000001D0, 0x010000E0, 0, 0},
+       {0x000001D4, 0x02000180, 0, 0},
+       {0x000001D8, 0x03000280, 0, 0},
+       {0x000001DC, 0x03FE0380, 0, 0},
+       {0x000001E0, 0x00100000, 0, 0},
+       {0x000001E4, 0x00400020, 0, 0},
+       {0x000001E8, 0x00800060, 0, 0},
+       {0x000001EC, 0x00C000A0, 0, 0},
+       {0x000001F0, 0x010000E0, 0, 0},
+       {0x000001F4, 0x02000180, 0, 0},
+       {0x000001F8, 0x03000280, 0, 0},
+       {0x000001FC, 0x03FE0380, 0, 0},
+       {0x00000200, 0x00800080, 0, 0},
+       {0x00000204, 0x00800080, 0, 0},
+       {0x00000208, 0x00800080, 0, 0},
+       {0x0000020C, 0x00800080, 0, 0},
+       {0x00000210, 0x00800080, 0, 0},
+       {0x00000214, 0x00800080, 0, 0},
+       {0x00000218, 0x00800080, 0, 0},
+       {0x0000021C, 0x00800080, 0, 0},
+       {0x00000220, 0x00800080, 0, 0},
+       {0x00000224, 0x00800080, 0, 0},
+       {0x00000228, 0x00800080, 0, 0},
+       {0x0000022C, 0x00800080, 0, 0},
+       {0x00000230, 0x00800080, 0, 0},
+       {0x00000234, 0x00800080, 0, 0},
+       {0x00000238, 0x00800080, 0, 0},
+       {0x0000023C, 0x00800080, 0, 0},
+       {0x00000240, 0x00800080, 0, 0},
+       {0x00000244, 0x00800080, 0, 0},
+       {0x00000248, 0x00800080, 0, 0},
+       {0x0000024C, 0x00800080, 0, 0},
+       {0x00000250, 0x00800080, 0, 0},
+       {0x00000254, 0x00800080, 0, 0},
+       {0x00000258, 0x00800080, 0, 0},
+       {0x0000025C, 0x00800080, 0, 0},
+       {0x00000260, 0x00800080, 0, 0},
+       {0x00000264, 0x00800080, 0, 0},
+       {0x00000268, 0x00800080, 0, 0},
+       {0x0000026C, 0x00800080, 0, 0},
+       {0x00000270, 0x00800080, 0, 0},
+       {0x00000274, 0x00800080, 0, 0},
+       {0x00000278, 0x00800080, 0, 0},
+       {0x0000027C, 0x00800080, 0, 0},
+       /* config OECFHM(03D0H~03E4H) */
+       {0x000003D0, 0x04000000, 0, 0},
+       {0x000003D4, 0x0C000800, 0, 0},
+       {0x000003D8, 0x00000FFF, 0, 0},
+       {0x000003DC, 0x08000800, 0, 0},
+       {0x000003E0, 0x08000800, 0, 0},
+       {0x000003E4, 0x00000800, 0, 0},
+       /* config LCCF(0050H, 0058H, 00E0H~00ECH) */
+       {0x00000050, 0x021C03C0, 0, 0},
+       {0x00000058, 0x0000000B, 0, 0},
+       {0x000000E0, 0x00000000, 0, 0},
+       {0x000000E4, 0x00000000, 0, 0},
+       {0x000000E8, 0x00000000, 0, 0},
+       {0x000000EC, 0x00000000, 0, 0},
+       /* config AWB(0280H~02DCH) */
+       {0x00000280, 0x00000000, 0, 0},
+       {0x00000284, 0x00000000, 0, 0},
+       {0x00000288, 0x00000000, 0, 0},
+       {0x0000028C, 0x00000000, 0, 0},
+       {0x00000290, 0x00000000, 0, 0},
+       {0x00000294, 0x00000000, 0, 0},
+       {0x00000298, 0x00000000, 0, 0},
+       {0x0000029C, 0x00000000, 0, 0},
+       {0x000002A0, 0x00000000, 0, 0},
+       {0x000002A4, 0x00000000, 0, 0},
+       {0x000002A8, 0x00000000, 0, 0},
+       {0x000002AC, 0x00000000, 0, 0},
+       {0x000002B0, 0x00000000, 0, 0},
+       {0x000002B4, 0x00000000, 0, 0},
+       {0x000002B8, 0x00000000, 0, 0},
+       {0x000002BC, 0x00000000, 0, 0},
+       {0x000002C0, 0x00800080, 0, 0},
+       {0x000002C4, 0x00800080, 0, 0},
+       {0x000002C8, 0x00800080, 0, 0},
+       {0x000002CC, 0x00800080, 0, 0},
+       {0x000002D0, 0x00800080, 0, 0},
+       {0x000002D4, 0x00800080, 0, 0},
+       {0x000002D8, 0x00800080, 0, 0},
+       {0x000002DC, 0x00800080, 0, 0},
+       /* config CTC(0A10H) and DBC(0A14H) filter */
+       {0x00000A10, 0x41400040, 0, 0},
+       {0x00000A14, 0x02000200, 0, 0},
+       /* config CFA(0018H, 0A1CH) */
+       {0x00000018, 0x000011BB, 0, 0},
        {0x00000A1C, 0x00000032, 0, 0},
-//     {0x0000001C, 0x00000000, 0, 0},
-//     {0x00000020, 0x0437077F, 0, 0},
-//     {0x00000A0C, 0x04380780, 0, 0},
-       {0x00000A80, 0x88000000, 0, 0},
-       {0x00000A84, 0x881fa400, 0, 0},
-//     {0x00000A88, 0x00000780, 0, 0},
-       {0x00000A8C, 0x00000010, 0, 0},
+       /* config CCM(0C40H~0CA4H) */
+       {0x00000C40, 0x00060000, 0, 0},
+       {0x00000C44, 0x00000000, 0, 0},
+       {0x00000C48, 0x00000000, 0, 0},
+       {0x00000C4C, 0x00000000, 0, 0},
+       {0x00000C50, 0x00000000, 0, 0},
+       {0x00000C54, 0x00000000, 0, 0},
+       {0x00000C58, 0x00000000, 0, 0},
+       {0x00000C5C, 0x00000000, 0, 0},
+       {0x00000C60, 0x00000000, 0, 0},
+       {0x00000C64, 0x00000000, 0, 0},
+       {0x00000C68, 0x00000000, 0, 0},
+       {0x00000C6C, 0x00000000, 0, 0},
+       {0x00000C70, 0x00000080, 0, 0},
+       {0x00000C74, 0x00000000, 0, 0},
+       {0x00000C78, 0x00000000, 0, 0},
+       {0x00000C7C, 0x00000000, 0, 0},
+       {0x00000C80, 0x00000080, 0, 0},
+       {0x00000C84, 0x00000000, 0, 0},
+       {0x00000C88, 0x00000000, 0, 0},
+       {0x00000C8C, 0x00000000, 0, 0},
+       {0x00000C90, 0x00000080, 0, 0},
+       {0x00000C94, 0x00000000, 0, 0},
+       {0x00000C98, 0x00000000, 0, 0},
+       {0x00000C9C, 0x00000000, 0, 0},
+       {0x00000CA0, 0x00000700, 0, 0},
+       {0x00000CA4, 0x00000200, 0, 0},
+       /* config GMARGB(0E00H~0E38H) */
+       {0x00000E00, 0x24000000, 0, 0},
+       {0x00000E04, 0x08000020, 0, 0},
+       {0x00000E08, 0x08000040, 0, 0},
+       {0x00000E0C, 0x08000060, 0, 0},
+       {0x00000E10, 0x08000080, 0, 0},
+       {0x00000E14, 0x080000A0, 0, 0},
+       {0x00000E18, 0x080000C0, 0, 0},
+       {0x00000E1C, 0x080000E0, 0, 0},
+       {0x00000E20, 0x08000100, 0, 0},
+       {0x00000E24, 0x08000180, 0, 0},
+       {0x00000E28, 0x08000200, 0, 0},
+       {0x00000E2C, 0x08000280, 0, 0},
+       {0x00000E30, 0x08000300, 0, 0},
+       {0x00000E34, 0x08000380, 0, 0},
+       {0x00000E38, 0x080003FE, 0, 0},
+       /* config R2Y(0E40H~0E60H) */
+       {0x00000E40, 0x0000004C, 0, 0},
+       {0x00000E44, 0x00000097, 0, 0},
+       {0x00000E48, 0x0000001D, 0, 0},
+       {0x00000E4C, 0x000001D5, 0, 0},
+       {0x00000E50, 0x000001AC, 0, 0},
+       {0x00000E54, 0x00000080, 0, 0},
+       {0x00000E58, 0x00000080, 0, 0},
+       {0x00000E5C, 0x00000194, 0, 0},
+       {0x00000E60, 0x000001EC, 0, 0},
+       /* config YCRV(0F00H~0FFCH) */
+       {0x00000F00, 0x00000000, 0, 0},
+       {0x00000F04, 0x00000010, 0, 0},
+       {0x00000F08, 0x00000020, 0, 0},
+       {0x00000F0C, 0x00000030, 0, 0},
+       {0x00000F10, 0x00000040, 0, 0},
+       {0x00000F14, 0x00000050, 0, 0},
+       {0x00000F18, 0x00000060, 0, 0},
+       {0x00000F1C, 0x00000070, 0, 0},
+       {0x00000F20, 0x00000080, 0, 0},
+       {0x00000F24, 0x00000090, 0, 0},
+       {0x00000F28, 0x000000A0, 0, 0},
+       {0x00000F2C, 0x000000B0, 0, 0},
+       {0x00000F30, 0x000000C0, 0, 0},
+       {0x00000F34, 0x000000D0, 0, 0},
+       {0x00000F38, 0x000000E0, 0, 0},
+       {0x00000F3C, 0x000000F0, 0, 0},
+       {0x00000F40, 0x00000100, 0, 0},
+       {0x00000F44, 0x00000110, 0, 0},
+       {0x00000F48, 0x00000120, 0, 0},
+       {0x00000F4C, 0x00000130, 0, 0},
+       {0x00000F50, 0x00000140, 0, 0},
+       {0x00000F54, 0x00000150, 0, 0},
+       {0x00000F58, 0x00000160, 0, 0},
+       {0x00000F5C, 0x00000170, 0, 0},
+       {0x00000F60, 0x00000180, 0, 0},
+       {0x00000F64, 0x00000190, 0, 0},
+       {0x00000F68, 0x000001A0, 0, 0},
+       {0x00000F6C, 0x000001B0, 0, 0},
+       {0x00000F70, 0x000001C0, 0, 0},
+       {0x00000F74, 0x000001D0, 0, 0},
+       {0x00000F78, 0x000001E0, 0, 0},
+       {0x00000F7C, 0x000001F0, 0, 0},
+       {0x00000F80, 0x00000200, 0, 0},
+       {0x00000F84, 0x00000210, 0, 0},
+       {0x00000F88, 0x00000220, 0, 0},
+       {0x00000F8C, 0x00000230, 0, 0},
+       {0x00000F90, 0x00000240, 0, 0},
+       {0x00000F94, 0x00000250, 0, 0},
+       {0x00000F98, 0x00000260, 0, 0},
+       {0x00000F9C, 0x00000270, 0, 0},
+       {0x00000FA0, 0x00000280, 0, 0},
+       {0x00000FA4, 0x00000290, 0, 0},
+       {0x00000FA8, 0x000002A0, 0, 0},
+       {0x00000FAC, 0x000002B0, 0, 0},
+       {0x00000FB0, 0x000002C0, 0, 0},
+       {0x00000FB4, 0x000002D0, 0, 0},
+       {0x00000FB8, 0x000002E0, 0, 0},
+       {0x00000FBC, 0x000002F0, 0, 0},
+       {0x00000FC0, 0x00000300, 0, 0},
+       {0x00000FC4, 0x00000310, 0, 0},
+       {0x00000FC8, 0x00000320, 0, 0},
+       {0x00000FCC, 0x00000330, 0, 0},
+       {0x00000FD0, 0x00000340, 0, 0},
+       {0x00000FD4, 0x00000350, 0, 0},
+       {0x00000FD8, 0x00000360, 0, 0},
+       {0x00000FDC, 0x00000370, 0, 0},
+       {0x00000FE0, 0x00000380, 0, 0},
+       {0x00000FE4, 0x00000390, 0, 0},
+       {0x00000FE8, 0x000003A0, 0, 0},
+       {0x00000FEC, 0x000003B0, 0, 0},
+       {0x00000FF0, 0x000003C0, 0, 0},
+       {0x00000FF4, 0x000003D0, 0, 0},
+       {0x00000FF8, 0x000003E0, 0, 0},
+       {0x00000FFC, 0x000003F0, 0, 0},
+       /* config Shrp(0E80H~0EE8H) */
+       {0x00000E80, 0x00070F00, 0, 0},
+       {0x00000E84, 0x00180F00, 0, 0},
+       {0x00000E88, 0x00800F00, 0, 0},
+       {0x00000E8C, 0x01000F00, 0, 0},
+       {0x00000E90, 0x00100F00, 0, 0},
+       {0x00000E94, 0x00600F00, 0, 0},
+       {0x00000E98, 0x01000F00, 0, 0},
+       {0x00000E9C, 0x01900F00, 0, 0},
+       {0x00000EA0, 0x00000F00, 0, 0},
+       {0x00000EA4, 0x00000F00, 0, 0},
+       {0x00000EA8, 0x00000F00, 0, 0},
+       {0x00000EAC, 0x00000F00, 0, 0},
+       {0x00000EB0, 0x00000F00, 0, 0},
+       {0x00000EB4, 0x00000F00, 0, 0},
+       {0x00000EB8, 0x00000F00, 0, 0},
+       {0x00000EBC, 0x10000000, 0, 0},
+       {0x00000EC0, 0x10000000, 0, 0},
+       {0x00000EC4, 0x10000000, 0, 0},
+       {0x00000EC8, 0x10000000, 0, 0},
+       {0x00000ECC, 0x10000000, 0, 0},
+       {0x00000ED0, 0x10000000, 0, 0},
+       {0x00000ED4, 0x88000D7C, 0, 0},
+       {0x00000ED8, 0x00C00040, 0, 0},
+       {0x00000EDC, 0xFF000000, 0, 0},
+       {0x00000EE0, 0x00A00040, 0, 0},
+       {0x00000EE4, 0x00000000, 0, 0},
+       {0x00000EE8, 0x00000000, 0, 0},
+       /* config DNYUV(0C00H~0C24H) */
+       {0x00000C00, 0x00777777, 0, 0},
+       {0x00000C04, 0x00007777, 0, 0},
+       {0x00000C08, 0x00777777, 0, 0},
+       {0x00000C0C, 0x00007777, 0, 0},
+       {0x00000C10, 0x00600040, 0, 0},
+       {0x00000C14, 0x00D80090, 0, 0},
+       {0x00000C18, 0x01E60144, 0, 0},
+       {0x00000C1C, 0x00600040, 0, 0},
+       {0x00000C20, 0x00D80090, 0, 0},
+       {0x00000C24, 0x01E60144, 0, 0},
+       /* config SAT(0A30H~0A40H, 0A54H~0A58H) */
+       {0x00000A30, 0x00000100, 0, 0},
+       {0x00000A34, 0x001F0001, 0, 0},
+       {0x00000A38, 0x00000000, 0, 0},
+       {0x00000A3C, 0x00000100, 0, 0},
+       {0x00000A40, 0x00000008, 0, 0},
+       {0x00000A54, 0x04010001, 0, 0},
+       {0x00000A58, 0x03FF0001, 0, 0},
+       /* config OBA(0090H~0094H) */
+       {0x00000090, 0x04380000, 0, 0},
+       {0x00000094, 0x04390780, 0, 0},
+       /* config SC(0098H~009CH, 00B8H~00BCH,
+        * 00C0H, 0C4H~0D4H, 04D0H~054CH, 5D0H~5D4H)
+        */
+       {0x0000009C, 0x01000000, 0, 0},
+       {0x000000B8, 0x000C0000, 0, 0},
+       {0x000000BC, 0xC010151D, 0, 0},
+       {0x000000C0, 0x01F1BF08, 0, 0},
+       {0x000000C4, 0xFF00FF00, 0, 0},
+       {0x000000C8, 0xFF00FF00, 0, 0},
+       {0x000000CC, 0xFFFF0000, 0, 0},
+       {0x000000D0, 0xFFFF0000, 0, 0},
+       {0x000000D4, 0xFFFF0000, 0, 0},
+       {0x000000D8, 0x01050107, 0, 0},
+       {0x000004D0, 0x00000000, 0, 0},
+       {0x000004D4, 0x00000000, 0, 0},
+       {0x000004D8, 0x00000000, 0, 0},
+       {0x000004DC, 0x00000000, 0, 0},
+       {0x000004E0, 0x00000000, 0, 0},
+       {0x000004E4, 0x00000000, 0, 0},
+       {0x000004E8, 0x00000000, 0, 0},
+       {0x000004EC, 0x00000000, 0, 0},
+       {0x000004F0, 0x00100000, 0, 0},
+       {0x000004F4, 0x00000000, 0, 0},
+       {0x000004F8, 0x03D20000, 0, 0},
+       {0x000004FC, 0x00000000, 0, 0},
+       {0x00000500, 0x00950000, 0, 0},
+       {0x00000504, 0x00000000, 0, 0},
+       {0x00000508, 0x00253000, 0, 0},
+       {0x0000050C, 0x00000000, 0, 0},
+       {0x00000510, 0x00000000, 0, 0},
+       {0x00000514, 0x00000000, 0, 0},
+       {0x00000518, 0x00000000, 0, 0},
+       {0x0000051C, 0x00000000, 0, 0},
+       {0x00000520, 0x00000000, 0, 0},
+       {0x00000524, 0x00000000, 0, 0},
+       {0x00000528, 0x00000000, 0, 0},
+       {0x0000052C, 0x00000000, 0, 0},
+       {0x00000530, 0x00000000, 0, 0},
+       {0x00000534, 0x00000000, 0, 0},
+       {0x00000538, 0xFFFFFFF0, 0, 0},
+       {0x0000053C, 0x8FFFFFFF, 0, 0},
+       {0x00000540, 0x0000001E, 0, 0},
+       {0x00000544, 0x00000000, 0, 0},
+       {0x00000548, 0x00000000, 0, 0},
+       {0x0000054C, 0xF0F20000, 0, 0},
+       {0x000005D0, 0xFF00FF00, 0, 0},
+       {0x000005D4, 0xFF00FF00, 0, 0},
+       /* config YHIST(0CC8H~0CD8H) */
+       {0x00000CC8, 0x00000000, 0, 0},
+       {0x00000CCC, 0x0437077F, 0, 0},
+       {0x00000CD0, 0x00010002, 0, 0},
+       {0x00000CD4, 0x00000000, 0, 0},
+       /* config CBAR(0600H-0653H) */
+       {0x00000600, 0x043E0782, 0, 0},
+       {0x00000604, 0x00000000, 0, 0},
+       {0x00000608, 0x0437077F, 0, 0},
+       {0x0000060C, 0x00443150, 0, 0},
+       {0x00000610, 0x00000000, 0, 0},
+       {0x00000614, 0x08880888, 0, 0},
+       {0x00000618, 0x02220222, 0, 0},
+       {0x0000061C, 0x04440444, 0, 0},
+       {0x00000620, 0x08880888, 0, 0},
+       {0x00000624, 0x0AAA0AAA, 0, 0},
+       {0x00000628, 0x0CCC0CCC, 0, 0},
+       {0x0000062C, 0x0EEE0EEE, 0, 0},
+       {0x00000630, 0x0FFF0FFF, 0, 0},
+       {0x00000634, 0x08880888, 0, 0},
+       {0x00000638, 0x02220222, 0, 0},
+       {0x0000063C, 0x04440444, 0, 0},
+       {0x00000640, 0x08880888, 0, 0},
+       {0x00000644, 0x0AAA0AAA, 0, 0},
+       {0x00000648, 0x0CCC0CCC, 0, 0},
+       {0x0000064C, 0x0EEE0EEE, 0, 0},
+       {0x00000650, 0x0FFF0FFF, 0, 0},
+       /* config sensor(0014H) */
+       {0x00000014, 0x0000000c, 0, 0},
+       /* config CROP(001CH, 0020H) */
+       {0x0000001C, 0x00000000, 0, 0},
+       {0x00000020, 0x0437077F, 0, 0},
+       /* config isp pileline X/Y size(A0CH) */
+       {0x00000A0C, 0x04380780, 0, 0},
+       /* config CSI dump (24H/28H) */
+       {0x00000028, 0x00030B80, 0, 0},
+       /* Video Output */
+       /* config UO(0A80H~0A90H) */
+       {0x00000A88, 0x00000780, 0, 0},
+       /* NV12 */
+       {0x00000A8C, 0x00000000, 0, 0},
+       /* NV21
+        *{0x00000A8C, 0x00000020, 0, 0},
+        */
        {0x00000A90, 0x00000000, 0, 0},
-       {0x00000A94, 0x803f4810, 0, 0},
-       {0x00000A98, 0x80517990, 0, 0},
-       {0x00000A9c, 0x000005c0, 0, 0},
-       {0x00000AA0, 0x0c000000, 0, 0},
-       {0x00000AA4, 0x0c000000, 0, 0},
-       {0x00000AA8, 0x05a0032a, 0, 0},
-       {0x00000AAC, 0x0418e410, 0, 0},
-       {0x00000AB0, 0x0420cd10, 0, 0},
-       {0x00000AB4, 0x0000021c, 0, 0},
-       {0x00000AB8, 0x08000000, 0, 0},
-       {0x00000ABc, 0x08000000, 0, 0},
-       {0x00000AC0, 0x021c03c0, 0, 0},
+       {0x00000A9C, 0x00000780, 0, 0},
+       {0x00000AA0, 0x00000002, 0, 0},
+       {0x00000AA4, 0x00000002, 0, 0},
+       {0x00000AA8, 0x07800438, 0, 0},
+       {0x00000AB4, 0x00000780, 0, 0},
+       {0x00000AB8, 0x00000002, 0, 0},
+       {0x00000ABC, 0x00000002, 0, 0},
+       {0x00000AC0, 0x07800438, 0, 0},
        {0x00000AC4, 0x00000000, 0, 0},
-       {0x00000E40, 0x0000004D, 0, 0},
-       {0x00000E44, 0x00000096, 0, 0},
-       {0x00000E48, 0x0000001D, 0, 0},
-       {0x00000E4C, 0x000001DA, 0, 0},
-       {0x00000E50, 0x000001B6, 0, 0},
-       {0x00000E54, 0x00000070, 0, 0},
-       {0x00000E58, 0x0000009D, 0, 0},
-       {0x00000E5C, 0x0000017C, 0, 0},
-       {0x00000E60, 0x000001E6, 0, 0},
-       {0x00000010, 0x00000000, 0, 0},
-       {0x00000A08, 0x10000022, 0xFFFFFFF, 0},
-       {0x00000044, 0x00000000, 0, 0},
-       {0x00000A00, 0x00120002, 0, 0},
-       {0x00000A00, 0x00120000, 0, 0},
-       {0x00000A50, 0x00000002, 0, 0},
-       {0x00000A00, 0x00120001, 0, 0},
-       {0x00000008, 0x00010000, 0, 0},
-       {0x00000008, 0x00020004, 0, 0},
-       {0x00000000, 0x00000001, 0, 0},
+       /* config TIL(0B20H~0B48H) */
+       {0x00000B20, 0x04380780, 0, 0},
+       {0x00000B24, 0x00000960, 0, 0},
+       {0x00000B38, 0x00030003, 0, 0},
+       {0x00000B3C, 0x00000960, 0, 0},
+       {0x00000B44, 0x00000000, 0, 0},
+       {0x00000B48, 0x00000000, 0, 0},
+       /* Enable DEC/OBC/OECF/LCCF/AWB/SC/DUMP */
+       {0x00000010, 0x000A00D6, 0x00000000, 0x00},
+       /* Enable CFA/CAR/CCM/GMARGB/R2Y/SHRP/SAT/DNYUV/YCRV/YHIST/CTC/DBC */
+       {0x00000A08, 0x107A01BE, 0x00000000, 0x00},
 };
 
-static const struct regval_t isp_ov13850_reg_config_list[] = {
-       {0x00000014, 0x00000001, 0, 0},
-//     {0x00000018, 0x000011BB, 0, 0},
-       {0x00000A1C, 0x00000030, 0, 0},
-//     {0x0000001C, 0x00000000, 0, 0},
-//     {0x00000020, 0x0437077F, 0, 0},
-//     {0x00000A0C, 0x04380780, 0, 0},
-       {0x00000A80, 0x88000000, 0, 0},
-       {0x00000A84, 0x881fa400, 0, 0},
-//     {0x00000A88, 0x00000780, 0, 0},
-       {0x00000A8C, 0x00000010, 0, 0},
-       {0x00000A90, 0x00000000, 0, 0},
-       {0x00000A94, 0x803f4810, 0, 0},
-       {0x00000A98, 0x80517990, 0, 0},
-       {0x00000A9c, 0x000005c0, 0, 0},
-       {0x00000AA0, 0x0c000000, 0, 0},
-       {0x00000AA4, 0x0c000000, 0, 0},
-       {0x00000AA8, 0x05a0032a, 0, 0},
-       {0x00000AAC, 0x0418e410, 0, 0},
-       {0x00000AB0, 0x0420cd10, 0, 0},
-       {0x00000AB4, 0x0000021c, 0, 0},
-       {0x00000AB8, 0x08000000, 0, 0},
-       {0x00000ABc, 0x08000000, 0, 0},
-       {0x00000AC0, 0x021c03c0, 0, 0},
-       {0x00000AC4, 0x00000000, 0, 0},
-       {0x00000E40, 0x0000004D, 0, 0},
-       {0x00000E44, 0x00000096, 0, 0},
-       {0x00000E48, 0x0000001D, 0, 0},
-       {0x00000E4C, 0x000001DA, 0, 0},
-       {0x00000E50, 0x000001B6, 0, 0},
-       {0x00000E54, 0x00000070, 0, 0},
-       {0x00000E58, 0x0000009D, 0, 0},
-       {0x00000E5C, 0x0000017C, 0, 0},
-       {0x00000E60, 0x000001E6, 0, 0},
-       {0x00000010, 0x00000000, 0, 0},
-       {0x00000A08, 0x10000022, 0xFFFFFFF, 0},
-       {0x00000044, 0x00000000, 0, 0},
-       {0x00000008, 0x00010005, 0, 0},
-       {0x00000A00, 0x00120002, 0, 0},
-       {0x00000A00, 0x00120000, 0, 0},
-       {0x00000A00, 0x00120001, 0, 0},
-       {0x00000000, 0x00000001, 0, 0},
+const struct reg_table isp_reg_init_settings[] = {
+       {isp_reg_init_config_list,
+       ARRAY_SIZE(isp_reg_init_config_list)},
+};
+
+static const struct regval_t isp_reg_start_config_list[] = {
+#if defined(ENABLE_SS0_SS1)
+       /* ENABLE UO/SS0/SS1/Multi-Frame and Reset ISP */
+       {0x00000A00, 0x00121802, 0x00000000, 0x0A},
+       /* ENABLE UO/SS0/SS1/Multi-Frame and Leave ISP reset */
+       {0x00000A00, 0x00121800, 0x00000000, 0x0A},
+#else
+       /* ENABLE UO/Multi-Frame and Reset ISP */
+       {0x00000A00, 0x00120002, 0x00000000, 0x0A},
+       /* ENABLE UO/Multi-Frame and Leave ISP reset */
+       {0x00000A00, 0x00120000, 0x00000000, 0x0A},
+#endif
+       /* Config ISP shadow mode as next-vsync */
+       {0x00000A50, 0x00000002, 0x00000000, 0x00},
+#if defined(ENABLE_SS0_SS1)
+       /* ENABLE UO/SS0/SS1/Multi-Frame and Enable ISP */
+       {0x00000A00, 0x00121801, 0x00000000, 0x0A},
+#else
+       /* ENABLE UO/Multi-Frame and Enable ISP */
+       {0x00000A00, 0x00120001, 0x00000000, 0x0A},
+#endif
+       /* Config CSI shadow mode as immediate to fetch current setting */
+       {0x00000008, 0x00010004, 0x00000000, 0x0A},
+       /* Config CSI shadow mode as next-vsync */
+       {0x00000008, 0x00020004, 0x00000000, 0x00},
+       /* Enable CSI */
+       {0x00000000, 0x00000001, 0x00000000, 0x0A},
 };
 
-static const struct regval_t isp_1080p_reg_config_list[] = {
+const struct reg_table isp_reg_start_settings[] = {
+       {isp_reg_start_config_list,
+       ARRAY_SIZE(isp_reg_start_config_list)},
+};
+
+static const struct regval_t isp_imx_219_reg_config_list[] = {
+       /* MIPI sensor */
        {0x00000014, 0x0000000D, 0, 0},
-       // {0x00000018, 0x000011BB, 0, 0},
+       /* config CFA(0018H, 0A1CH) */
        {0x00000A1C, 0x00000032, 0, 0},
-       // {0x0000001C, 0x00000000, 0, 0},
-       // {0x00000020, 0x0437077F, 0, 0},
-       // {0x00000A0C, 0x04380780, 0, 0},
-       // {0x00000A80, 0xF9000000, 0, 0},
-       // {0x00000A84, 0xF91FA400, 0, 0},
-       // {0x00000A88, 0x00000780, 0, 0},
        {0x00000A8C, 0x00000000, 0, 0},
        {0x00000A90, 0x00000000, 0, 0},
+       /* config R2Y(0E40H~0E60H) */
        {0x00000E40, 0x0000004C, 0, 0},
        {0x00000E44, 0x00000097, 0, 0},
        {0x00000E48, 0x0000001D, 0, 0},
@@ -125,6 +619,7 @@ static const struct regval_t isp_1080p_reg_config_list[] = {
        {0x00000E58, 0x00000080, 0, 0},
        {0x00000E5C, 0x00000194, 0, 0},
        {0x00000E60, 0x000001EC, 0, 0},
+       /* Config AWB(0280H~02DCH). Fixed WB gain for IMX-219 sensor. */
        {0x00000280, 0x00000000, 0, 0},
        {0x00000284, 0x00000000, 0, 0},
        {0x00000288, 0x00000000, 0, 0},
@@ -149,6 +644,9 @@ static const struct regval_t isp_1080p_reg_config_list[] = {
        {0x000002D4, 0x00800080, 0, 0},
        {0x000002D8, 0x00B000B0, 0, 0},
        {0x000002DC, 0x00B000B0, 0, 0},
+       /* config GMARGB(0E00H~0E38H)
+        * Gamma RGB 1.9 for IMX-219 sensor
+        */
        {0x00000E00, 0x24000000, 0, 0},
        {0x00000E04, 0x159500A5, 0, 0},
        {0x00000E08, 0x0F9900EE, 0, 0},
@@ -165,38 +663,37 @@ static const struct regval_t isp_1080p_reg_config_list[] = {
        {0x00000E34, 0x047C03BB, 0, 0},
        {0x00000E38, 0x043703FF, 0, 0},
        {0x00000010, 0x00000080, 0, 0},
-       {0x00000A08, 0x10000032, 0xFFFFFFF, 0},
+       /* Enable CFA/GMARGB/R2Y */
+       {0x00000A08, 0x10000032, 0x0FFFFFFF, 0x00},
        {0x00000A00, 0x00120002, 0, 0},
        {0x00000A00, 0x00120000, 0, 0},
        {0x00000A50, 0x00000002, 0, 0},
-       {0x00000A00, 0x00120001, 0, 0},
        {0x00000008, 0x00010000, 0, 0},
        {0x00000008, 0x0002000A, 0, 0},
        {0x00000000, 0x00000001, 0, 0},
 };
 
-const struct reg_table isp_1920_1080_settings[] = {
-       {isp_1080p_reg_config_list,
-       ARRAY_SIZE(isp_1080p_reg_config_list)},
-};
-
-const struct reg_table isp_sc2235_settings[] = {
-       {isp_sc2235_reg_config_list,
-       ARRAY_SIZE(isp_sc2235_reg_config_list)},
-};
-
-const struct reg_table isp_ov13850_settings[] = {
-       {isp_ov13850_reg_config_list,
-       ARRAY_SIZE(isp_ov13850_reg_config_list)},
+const struct reg_table isp_imx_219_settings[] = {
+       {isp_imx_219_reg_config_list,
+       ARRAY_SIZE(isp_imx_219_reg_config_list)},
 };
 
 static struct regval_t isp_format_reg_list[] = {
-       {0x0000001C, 0x00000000, 0, 0},
-       {0x00000020, 0x0437077F, 0, 0},
-       {0x00000A0C, 0x04380780, 0, 0},
-       {0x00000A88, 0x00000780, 0, 0},
-       {0x00000018, 0x000011BB, 0, 0},
-       {0x00000A08, 0x10000022, 0xF0000000, 0},
+       {0x0000001C, 0x00000000, 0x00000000, 0},
+       {0x00000020, 0x0437077F, 0x00000000, 0},
+       {0x00000A0C, 0x04380780, 0x00000000, 0},
+       {0x00000A88, 0x00000780, 0x00000000, 0},
+       {0x00000018, 0x000011BB, 0x00000000, 0},
+       {0x00000A08, 0x10000000, 0xF0000000, 0},
+       {0x00000028, 0x00030B80, 0x0003FFFF, 0},
+       {0x00000AA8, 0x07800438, 0x00000000, 0},
+       {0x00000A9C, 0x00000780, 0x00000000, 0},
+       {0x00000AC0, 0x07800438, 0x00000000, 0},
+       {0x00000AB4, 0x00000780, 0x00000000, 0},
+       {0x00000B20, 0x04380780, 0x00000000, 0},
+       {0x00000B24, 0x00000960, 0x00000000, 0},
+       {0x00000B3C, 0x00000960, 0x00000000, 0},
+       {0x00000014, 0x00000008, 0x00000000, 0},
 };
 
 const struct reg_table  isp_format_settings[] = {
@@ -204,7 +701,10 @@ const struct reg_table  isp_format_settings[] = {
        ARRAY_SIZE(isp_format_reg_list)},
 };
 
-static const struct reg_table *isp_settings = isp_1920_1080_settings;
+#if defined(USE_NEW_CONFIG_SETTING)
+#else
+static struct reg_table  *isp_settings = (struct reg_table *)isp_imx_219_settings;
+#endif
 
 static void isp_load_regs(void __iomem *ispbase, const struct reg_table *table)
 {
@@ -231,6 +731,35 @@ static void isp_load_regs(void __iomem *ispbase, const struct reg_table *table)
        }
 }
 
+static void isp_load_regs_exclude_csi_isp_enable(
+                       void __iomem *ispbase,
+                       const struct reg_table *table)
+{
+       int j;
+       u32 delay_ms, reg_addr, mask, val;
+
+       for (j = 0; j < table->regval_num; j++) {
+               delay_ms = table->regval[j].delay_ms;
+               reg_addr = table->regval[j].addr;
+               val = table->regval[j].val;
+               mask = table->regval[j].mask;
+
+               if (reg_addr % 4
+                       || reg_addr > STF_ISP_REG_OFFSET_MAX
+                       || delay_ms > STF_ISP_REG_DELAY_MAX
+                       || ((reg_addr == ISP_REG_CSI_INPUT_EN_AND_STATUS) && (val & 0x01))
+                       || ((reg_addr == ISP_REG_ISP_CTRL_0) && (val & 0x01)))
+                       continue;
+
+               if (mask)
+                       reg_set_bit(ispbase, reg_addr, mask, val);
+               else
+                       reg_write(ispbase, reg_addr, val);
+               if (delay_ms)
+                       usleep_range(1000 * delay_ms, 1000 * delay_ms + 100);
+       }
+}
+
 static int stf_isp_clk_enable(struct stf_isp_dev *isp_dev)
 {
        struct stfcamss *stfcamss = isp_dev->stfcamss;
@@ -263,6 +792,17 @@ static int stf_isp_clk_disable(struct stf_isp_dev *isp_dev)
 
 static int stf_isp_reset(struct stf_isp_dev *isp_dev)
 {
+       struct stf_vin_dev *vin = isp_dev->stfcamss->vin;
+       void __iomem *ispbase;
+
+       if (isp_dev->id == 0)
+               ispbase = vin->isp_isp0_base;
+       else
+               ispbase = vin->isp_isp1_base;
+
+       reg_set_bit(ispbase, ISP_REG_ISP_CTRL_0, BIT(1), BIT(1));
+       reg_set_bit(ispbase, ISP_REG_ISP_CTRL_0, BIT(1), 0);
+
        return 0;
 }
 
@@ -278,7 +818,17 @@ static int stf_isp_config_set(struct stf_isp_dev *isp_dev)
 
        st_debug(ST_ISP, "%s, isp_id = %d\n", __func__, isp_dev->id);
 
-       isp_load_regs(ispbase, isp_format_settings);
+#if defined(USE_NEW_CONFIG_SETTING)
+       mutex_lock(&isp_dev->setfile_lock);
+       isp_load_regs(ispbase, isp_reg_init_settings);
+       if (isp_dev->setfile.state) {
+               st_info(ST_ISP, "%s, Program extra ISP setting!\n", __func__);
+               isp_load_regs_exclude_csi_isp_enable(ispbase,
+                       &isp_dev->setfile.settings);
+       }
+
+       mutex_unlock(&isp_dev->setfile_lock);
+#else
        mutex_lock(&isp_dev->setfile_lock);
        if (isp_dev->setfile.state)
                isp_load_regs(ispbase, &isp_dev->setfile.settings);
@@ -298,6 +848,7 @@ static int stf_isp_config_set(struct stf_isp_dev *isp_dev)
        st_debug(ST_ISP, "config 0x%x = 0x%x\n",
                        isp_format_reg_list[3].addr,
                        isp_format_reg_list[3].val);
+#endif
 
        return 0;
 }
@@ -305,7 +856,6 @@ static int stf_isp_config_set(struct stf_isp_dev *isp_dev)
 static int stf_isp_set_format(struct stf_isp_dev *isp_dev,
                struct isp_stream_format *crop_array, u32 mcode,
                int type)
-               // u32 width, u32 height)
 {
        struct stf_vin_dev *vin = isp_dev->stfcamss->vin;
        struct stf_dvp_dev *dvp_dev = isp_dev->stfcamss->dvp_dev;
@@ -316,12 +866,8 @@ static int stf_isp_set_format(struct stf_isp_dev *isp_dev,
 
        if (isp_dev->id == 0) {
                ispbase = vin->isp_isp0_base;
-               //isp_settings = isp_sc2235_settings;
-               //isp_settings = isp_ov13850_settings;
-               isp_settings = isp_1920_1080_settings;
        } else {
                ispbase = vin->isp_isp1_base;
-               isp_settings = isp_sc2235_settings;
        }
 
        st_debug(ST_ISP, "interface type is %d(%s)\n",
@@ -926,6 +1472,13 @@ void dump_isp_reg(void *__iomem ispbase, int id)
        u32 addr, val;
 
        st_debug(ST_ISP, "DUMP ISP%d register:\n", id);
+
+       for (j = 0; j < isp_reg_init_settings->regval_num; j++) {
+               addr = isp_reg_init_settings->regval[j].addr;
+               val = ioread32(ispbase + addr);
+               st_debug(ST_ISP, "{0x%08x, 0x%08x}\n", addr, val);
+       }
+
        for (j = 0; j < isp_format_settings->regval_num; j++) {
                addr = isp_format_settings->regval[j].addr;
                val = ioread32(ispbase + addr);
@@ -941,8 +1494,8 @@ void dump_isp_reg(void *__iomem ispbase, int id)
        val = ioread32(ispbase + ISP_REG_DUMP_CFG_1);
        st_debug(ST_ISP, "{0x%08x, 0x%08x}\n", ISP_REG_DUMP_CFG_1, val);
 
-       for (j = 0; j < isp_settings->regval_num; j++) {
-               addr = isp_settings->regval[j].addr;
+       for (j = 0; j < isp_reg_start_settings->regval_num; j++) {
+               addr = isp_reg_start_settings->regval[j].addr;
                val = ioread32(ispbase + addr);
                st_debug(ST_ISP, "{0x%08x, 0x%08x}\n", addr, val);
        }