10b966c5eSopenharmony_ciroot {
20b966c5eSopenharmony_ci    module = "camera";
30b966c5eSopenharmony_ci    camera_config {
40b966c5eSopenharmony_ci        match_attr = "hdf_camera_driver";
50b966c5eSopenharmony_ci        abilityConfig {
60b966c5eSopenharmony_ci            uvcMode = true;
70b966c5eSopenharmony_ci            template device {
80b966c5eSopenharmony_ci                deviceName = "camera0";
90b966c5eSopenharmony_ci                SensorConfig {
100b966c5eSopenharmony_ci                    mode = false; /* whether sensor is supported */
110b966c5eSopenharmony_ci                    template SensorDevice {
120b966c5eSopenharmony_ci                        name = "sensor0"; /* sensor name */
130b966c5eSopenharmony_ci                        id = 0; /* id */
140b966c5eSopenharmony_ci                        exposure = false; /* whether exposure is supported */
150b966c5eSopenharmony_ci                        mirror = false; /* whether mirror is supported */
160b966c5eSopenharmony_ci                        gain = false; /* whether gain is supported */
170b966c5eSopenharmony_ci                        ctrlValue = [
180b966c5eSopenharmony_ci                        /* id, min, max, step, default */
190b966c5eSopenharmony_ci                            0,   0,   0,   0,   0,
200b966c5eSopenharmony_ci                            8,   0,   0,   0,   0,
210b966c5eSopenharmony_ci                        ];
220b966c5eSopenharmony_ci                    }
230b966c5eSopenharmony_ci                }
240b966c5eSopenharmony_ci
250b966c5eSopenharmony_ci                IspConfig {
260b966c5eSopenharmony_ci                    mode = false; /* whether isp is supported */
270b966c5eSopenharmony_ci                    name = "isp0"; /* isp name */
280b966c5eSopenharmony_ci                    id = 0; /* id */
290b966c5eSopenharmony_ci                    brightness = false; /* whether brightness is supported */
300b966c5eSopenharmony_ci                    contrast = false; /* whether contrast is supported */
310b966c5eSopenharmony_ci                    saturation = false; /* whether saturation is supported */
320b966c5eSopenharmony_ci                    hue = false; /* whether hue is supported */
330b966c5eSopenharmony_ci                    sharpness = false; /* whether sharpness is supported */
340b966c5eSopenharmony_ci                    gain = false; /* whether gain is supported */
350b966c5eSopenharmony_ci                    gamma = false; /* whether gamma is supported */
360b966c5eSopenharmony_ci                    whiteBalance = false; /* whether whiteBalance is supported */
370b966c5eSopenharmony_ci                    ctrlValue = [
380b966c5eSopenharmony_ci                    /* id, min, max, step, default */
390b966c5eSopenharmony_ci                        1,   0,   0,   0,   0,
400b966c5eSopenharmony_ci                        2,   0,   0,   0,   0,
410b966c5eSopenharmony_ci                        3,   0,   0,   0,   0,
420b966c5eSopenharmony_ci                        4,   0,   0,   0,   0,
430b966c5eSopenharmony_ci                        5,   0,   0,   0,   0,
440b966c5eSopenharmony_ci                        6,   0,   0,   0,   0,
450b966c5eSopenharmony_ci                        7,   0,   0,   0,   0,
460b966c5eSopenharmony_ci                        8,   0,   0,   0,   0,
470b966c5eSopenharmony_ci                        9,   0,   0,   0,   0,
480b966c5eSopenharmony_ci                    ];
490b966c5eSopenharmony_ci                }
500b966c5eSopenharmony_ci
510b966c5eSopenharmony_ci                VcmConfig {
520b966c5eSopenharmony_ci                    mode = false; /* whether vcm is supported */
530b966c5eSopenharmony_ci                    template VcmDevice {
540b966c5eSopenharmony_ci                        name = "vcm0"; /* vcm name */
550b966c5eSopenharmony_ci                        id = 0; /* id */
560b966c5eSopenharmony_ci                        focus = false; /* whether focus is supported */
570b966c5eSopenharmony_ci                        autoFocus = false; /* whether autoFocus is supported */
580b966c5eSopenharmony_ci                        zoom = false; /* whether zoom is supported */
590b966c5eSopenharmony_ci                        zoomMaxNum = 0; /* max zoom */
600b966c5eSopenharmony_ci                        ctrlValue = [
610b966c5eSopenharmony_ci                        /* id, min, max, step, default */
620b966c5eSopenharmony_ci                            12,   0,   0,   0,   0,
630b966c5eSopenharmony_ci                            13,   0,   0,   0,   0,
640b966c5eSopenharmony_ci                            14,   0,   0,   0,   0,
650b966c5eSopenharmony_ci                            15,   0,   0,   0,   0,
660b966c5eSopenharmony_ci                            16,   0,   0,   0,   0,
670b966c5eSopenharmony_ci                            17,   0,   0,   0,   0,
680b966c5eSopenharmony_ci                        ];
690b966c5eSopenharmony_ci                    }
700b966c5eSopenharmony_ci                }
710b966c5eSopenharmony_ci
720b966c5eSopenharmony_ci                LensConfig {
730b966c5eSopenharmony_ci                    mode = false; /* whether lens is supported */
740b966c5eSopenharmony_ci                    template LensDevice {
750b966c5eSopenharmony_ci                        name = "lens0"; /* lens name */
760b966c5eSopenharmony_ci                        id = 0; /* id */
770b966c5eSopenharmony_ci                        aperture = false; /* whether aperture is supported */
780b966c5eSopenharmony_ci                        ctrlValue = [
790b966c5eSopenharmony_ci                        /* id, min, max, step, default */
800b966c5eSopenharmony_ci                           18,   0,   0,   0,   0,
810b966c5eSopenharmony_ci                           19,   0,   0,   0,   0,
820b966c5eSopenharmony_ci                        ];
830b966c5eSopenharmony_ci                    }
840b966c5eSopenharmony_ci                }
850b966c5eSopenharmony_ci
860b966c5eSopenharmony_ci                FlashConfig {
870b966c5eSopenharmony_ci                    mode = false; /* whether flash is supported */
880b966c5eSopenharmony_ci                    name = "flash0"; /* flash name */
890b966c5eSopenharmony_ci                    id = 0; /* id */
900b966c5eSopenharmony_ci                    flashMode = false; /* whether switch flashing light is supported */
910b966c5eSopenharmony_ci                    flashIntensity = false; /* whether it supports setting flash light intensity */
920b966c5eSopenharmony_ci                    ctrlValue = [
930b966c5eSopenharmony_ci                    /* id, min, max, step, default */
940b966c5eSopenharmony_ci                        20,   0,   0,   0,   0,
950b966c5eSopenharmony_ci                        21,   0,   0,   0,   0,
960b966c5eSopenharmony_ci                    ];
970b966c5eSopenharmony_ci                }
980b966c5eSopenharmony_ci
990b966c5eSopenharmony_ci                StreamConfig {
1000b966c5eSopenharmony_ci                    mode = false; /* whether stream is supported */
1010b966c5eSopenharmony_ci                    template StreamDevice {
1020b966c5eSopenharmony_ci                        name = "stream0"; /* stream name */
1030b966c5eSopenharmony_ci                        id = 0; /* id */
1040b966c5eSopenharmony_ci                        heightMaxNum = 0; /* max height */
1050b966c5eSopenharmony_ci                        widthMaxNum = 0; /* max width */
1060b966c5eSopenharmony_ci                        frameRateMaxNum = 0; /* max frameRate */
1070b966c5eSopenharmony_ci                        bufferCount = 0; /* buffer count */
1080b966c5eSopenharmony_ci                        bufferType = [ /* buffer type */
1090b966c5eSopenharmony_ci                                0, /* MMAP */
1100b966c5eSopenharmony_ci                                1, /* DMA_BUF */
1110b966c5eSopenharmony_ci                                2 /* USERPTR */
1120b966c5eSopenharmony_ci                        ];
1130b966c5eSopenharmony_ci                        formatType = [ /* supported formats */
1140b966c5eSopenharmony_ci                                0, /* invalid format */
1150b966c5eSopenharmony_ci                                1, /* PIX_FMT_YUV420 */
1160b966c5eSopenharmony_ci                                2, /* PIX_FMT_YUV422 */
1170b966c5eSopenharmony_ci                                3, /* PIX_FMT_YUV444 */
1180b966c5eSopenharmony_ci                                100, /* PIX_FMT_RGB565 */
1190b966c5eSopenharmony_ci                                101, /* PIX_FMT_RGB444 */
1200b966c5eSopenharmony_ci                                102, /* PIX_FMT_RGB555 */
1210b966c5eSopenharmony_ci                                103, /* PIX_FMT_RGB32 */
1220b966c5eSopenharmony_ci                                200, /* PIX_FMT_SRGGB8 */
1230b966c5eSopenharmony_ci                                201, /* PIX_FMT_SRGGB10 */
1240b966c5eSopenharmony_ci                                202, /* PIX_FMT_SRGGB12 */
1250b966c5eSopenharmony_ci                                203, /* PIX_FMT_SBGGR8 */
1260b966c5eSopenharmony_ci                                204, /* PIX_FMT_SBGGR10 */
1270b966c5eSopenharmony_ci                                205, /* PIX_FMT_SBGGR12 */
1280b966c5eSopenharmony_ci                                300, /* PIX_FMT_JPEG */
1290b966c5eSopenharmony_ci                                301, /* PIX_FMT_MJPEG */
1300b966c5eSopenharmony_ci                                302, /* PIX_FMT_MPEG */
1310b966c5eSopenharmony_ci                                303, /* PIX_FMT_MPEG1 */
1320b966c5eSopenharmony_ci                                304, /* PIX_FMT_MPEG2 */
1330b966c5eSopenharmony_ci                                305, /* PIX_FMT_MPEG4 */
1340b966c5eSopenharmony_ci                                400, /* PIX_FMT_H264 */
1350b966c5eSopenharmony_ci                                401, /* PIX_FMT_H264_NO_SC */
1360b966c5eSopenharmony_ci                                402, /* PIX_FMT_H264_MVC */
1370b966c5eSopenharmony_ci                        ];
1380b966c5eSopenharmony_ci                    }
1390b966c5eSopenharmony_ci                }
1400b966c5eSopenharmony_ci            }
1410b966c5eSopenharmony_ci
1420b966c5eSopenharmony_ci            camera0 :: device {
1430b966c5eSopenharmony_ci                deviceName = "camera0";
1440b966c5eSopenharmony_ci                SensorConfig {
1450b966c5eSopenharmony_ci                    mode = true;
1460b966c5eSopenharmony_ci                    sensor0 :: SensorDevice {
1470b966c5eSopenharmony_ci                        name = "rkisp_v5";
1480b966c5eSopenharmony_ci                        id = 0;
1490b966c5eSopenharmony_ci                        exposure = true;
1500b966c5eSopenharmony_ci                        ctrlValue = [
1510b966c5eSopenharmony_ci                        /* id, min, max, step, default */
1520b966c5eSopenharmony_ci                           0,  10,   20,   30,   40,
1530b966c5eSopenharmony_ci                           8,  50,   60,   70,   80,
1540b966c5eSopenharmony_ci                        ];
1550b966c5eSopenharmony_ci                    }
1560b966c5eSopenharmony_ci                }
1570b966c5eSopenharmony_ci
1580b966c5eSopenharmony_ci                IspConfig {
1590b966c5eSopenharmony_ci                    mode = true;
1600b966c5eSopenharmony_ci                    name = "ISP0";
1610b966c5eSopenharmony_ci                    id = 0;
1620b966c5eSopenharmony_ci                    brightness = true;
1630b966c5eSopenharmony_ci                    whiteBalance = true;
1640b966c5eSopenharmony_ci                }
1650b966c5eSopenharmony_ci
1660b966c5eSopenharmony_ci                StreamConfig {
1670b966c5eSopenharmony_ci                    mode = true;
1680b966c5eSopenharmony_ci                    Stream0 :: StreamDevice {
1690b966c5eSopenharmony_ci                        name = "rkisp_v5";
1700b966c5eSopenharmony_ci                        id = 0;
1710b966c5eSopenharmony_ci                        heightMaxNum = 860;
1720b966c5eSopenharmony_ci                        widthMaxNum = 820;
1730b966c5eSopenharmony_ci                        bufferCount = 5;
1740b966c5eSopenharmony_ci                        bufferType = [3];
1750b966c5eSopenharmony_ci                        formatType = [1,2,3,200];
1760b966c5eSopenharmony_ci                    }
1770b966c5eSopenharmony_ci                }
1780b966c5eSopenharmony_ci            }
1790b966c5eSopenharmony_ci        }
1800b966c5eSopenharmony_ci    }
1810b966c5eSopenharmony_ci}
182