AM62A-PET-CALC: Camera sensor bringup Issue

Part Number: AM62A-PET-CALC

Hello Team,

Greetings for the day!!

Currently I am working on the Custom board based on AM62A74AVMSIAMBQ1.

I want to bringup the new camera sesnor OX02F10. 

We have to bringup the camera sensor without SerDes using Linux SDK.

Currently we have:

1)Camera sensor: OX02F10

2)Kyocera 6499 FPC ZIF 21P 0.5Pitch connector.

3)HDMI port

4)Linux SDK: ti-processor-sdk-linux-edgeai-am62axx-evm-09_02_00_05

Kindly requesting to provide the following details:
1)Please provide the ox02f10 example code on linux side without SerDes like RTOS side.

2)Testing steps(like test apps, how to perfomr the testing,...)

I have followed the page for addign the new sensore : Use Camera 

I have found the probing issue. The detailed log mentioned below:

Log:

root@am62axx-evm:/opt/edgeai-gst-apps#
root@am62axx-evm:/opt/edgeai-gst-apps#
root@am62axx-evm:/opt/edgeai-gst-apps#
root@am62axx-evm:/opt/edgeai-gst-apps#
root@am62axx-evm:/opt/edgeai-gst-apps# cd /
root@am62axx-evm:/#
root@am62axx-evm:/#
root@am62axx-evm:/#
root@am62axx-evm:/#
root@am62axx-evm:/# i2cdetect -y 2
Warning: Can't use SMBus Quick Write command, will skip some addresses
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:
10:
20:
30: -- -- -- -- -- -- -- --
40:
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60:
70:
root@am62axx-evm:/# lsmod | grep ox02
ox02f10                40960  0
v4l2_fwnode            20480  2 ox02f10,cdns_csi2rx
v4l2_async             24576  4 v4l2_fwnode,j721e_csi2rx,ox02f10,cdns_csi2rx
videodev              245760  9 v4l2_async,j721e_csi2rx,ox02f10,videobuf2_v4l2,cdns_csi2rx,videobuf2_common,v4l2_mem2mem,e5010_jpeg_enc,wave5
mc                     57344  8 v4l2_async,videodev,j721e_csi2rx,ox02f10,videobuf2_v4l2,cdns_csi2rx,videobuf2_common,v4l2_mem2mem
root@am62axx-evm:/# dmesg | grep -i ox02
[   10.152051] ox02f10: loading out-of-tree module taints kernel.
[   10.217717] ox02f10 2-0036: error -EREMOTEIO: failed to read chip ID
[   10.224393] ox02f10: probe of 2-0036 failed with error -121
root@am62axx-evm:/# dmesg | grep -iE "ox02|camera|probe|i2c"
[    1.134484] i2c_dev: i2c /dev entries driver
[    1.384526] i2c 0-0048: Fixed dependency cycle(s) with /bus@f0000/i2c@20000000/pmic@48/regulators/buck5
[    1.394423] omap_i2c 20000000.i2c: bus 0 rev0.12 at 400 kHz
[    1.402151] omap_i2c 20020000.i2c: bus 1 rev0.12 at 400 kHz
[    1.409830] omap_i2c 20030000.i2c: bus 2 rev0.12 at 400 kHz
[    1.563481] spi-nand: probe of spi0.0 failed with error -524
[    4.897776] systemd[1]: Created slice Slice /system/modprobe.
[   10.152051] ox02f10: loading out-of-tree module taints kernel.
[   10.217717] ox02f10 2-0036: error -EREMOTEIO: failed to read chip ID
[   10.224393] ox02f10: probe of 2-0036 failed with error -121
[   13.163341] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 4/4 lanes, 4 streams, external D-PHY
[   23.489135] platform 30200000.dss: deferred probe pending
root@am62axx-evm:/#

image.png

Please guide how to bringup teh camera sensor.

Your guidance and support is highly appreciated!!

 

Thanks & Regards,

Undali Muniranga.

  • Hi Undali,

    1)Please provide the ox02f10 example code on linux side without SerDes like RTOS side.

    For sensor bringup, only a V4L2 driver is required. You can use the OV2312[1] or OX05B1S[2] drivers as reference for this. Both of these sensors drivers are validated from TI and you can use them as a reference. You would also need media graph setup, but that can be scripted. TI has provided reference scripts for that as well[3].

    2)Testing steps(like test apps, how to perfomr the testing,...)

    My recommendation would be to first test only CSI2RX capture. This would involve using utilities like v4l2-ctl or yavta to see if you are receiving frames. Then, you can start looking at a complete GStreamer pipeline to test end to end usecase.

    4)Linux SDK: ti-processor-sdk-linux-edgeai-am62axx-evm-09_02_00_05

    This is a little concerning to me. We have release SDK 11.1 on the AM62A platform and that has a number of improvements to the CSI2RX drivers. I would highly suggest migrating to the newer SDK.

    If you need me to elaborate on any one of these steps and give you more details, I would be happy to help. But, because this is a sensor that TI doesn't support, you would have to contact your sensor module vendor for getting the sensor configuration and validating your driver on that end. For integrating a valid sensor driver with a TI device, you can always reach out over E2E.

    Regards,
    Jay

    [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/i2c/ov2312.c?h=ti-android-linux-6.12.y 
    [2]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/i2c/ox05b1s.c?h=ti-android-linux-6.12.y 
    [3]: https://github.com/TexasInstruments/edgeai-gst-apps/blob/main/scripts/setup_camera_ox05b.sh 

  • Hello  ,

    Thanks a lot for your information!!

    I have implemented the drive and ran some of the commands. so as per that sensor is detected successfully.

    Now streaming is not happening. 

    Kindly check and please support for regarding the same. If you need any further information required i am happy to share.

    Detailed Log shared below:

    am62axx-evm login: root
    [ 573.847525] audit: type=1006 audit(575.984:25): pid=1375 uid=0 old-auid=42949 67295 auid=0 tty=(none) old-ses=4294967295 ses=3 res=1
    [ 573.859521] audit: type=1300 audit(575.984:25): arch=c00000b7 syscall=64 succ ess=yes exit=1 a0=8 a1=ffffc15b2218 a2=1 a3=0 items=0 ppid=1 pid=1375 auid=0 uid =0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="(sys temd)" exe="/lib/systemd/systemd" key=(null)
    [ 573.884443] audit: type=1327 audit(575.984:25): proctitle="(systemd)"
    [ 573.890951] audit: type=1334 audit(576.016:26): prog-id=17 op=LOAD
    [ 573.897264] audit: type=1300 audit(576.016:26): arch=c00000b7 syscall=280 suc cess=yes exit=8 a0=5 a1=fffffad2ddf0 a2=78 a3=0 items=0 ppid=1 pid=1375 auid=0 u id=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="sy stemd" exe="/lib/systemd/systemd" key=(null)
    [ 573.922199] audit: type=1327 audit(576.016:26): proctitle="(systemd)"
    [ 573.928698] audit: type=1334 audit(576.020:27): prog-id=17 op=UNLOAD
    [ 573.935130] audit: type=1334 audit(576.020:28): prog-id=18 op=LOAD
    [ 573.941409] audit: type=1300 audit(576.020:28): arch=c00000b7 syscall=280 suc cess=yes exit=8 a0=5 a1=fffffad2de90 a2=78 a3=0 items=0 ppid=1 pid=1375 auid=0 u id=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="sy stemd" exe="/lib/systemd/systemd" key=(null)
    [ 573.966319] audit: type=1327 audit(576.020:28): proctitle="(systemd)"

    Unable to setup formats: Inappropriate ioctl for device (25)
    Unable to setup formats: Inappropriate ioctl for device (25)
    OX02F10 Camera 0 detected
    device = /dev/video-ox02f10-cam0
    name = ox02f10
    format = [fmt:SRGGB10_1X10/1920x1080@1/30 field:none]
    subdev_id = /dev/v4l-ox02f10-subdev0
    isp_required = yes

    terminate called after throwing an instance of 'std::runtime_error'
    what(): failed to find DRM cards
    root@am62axx-evm:/opt/edgeai-gst-apps#
    root@am62axx-evm:/opt/edgeai-gst-apps#
    root@am62axx-evm:/opt/edgeai-gst-apps#
    root@am62axx-evm:/opt/edgeai-gst-apps#
    root@am62axx-evm:/opt/edgeai-gst-apps#
    root@am62axx-evm:/opt/edgeai-gst-apps#
    root@am62axx-evm:/opt/edgeai-gst-apps#
    root@am62axx-evm:/opt/edgeai-gst-apps#
    root@am62axx-evm:/opt/edgeai-gst-apps# cd /
    root@am62axx-evm:/# lsmod | grep ox02
    ox02f10 40960 1
    v4l2_fwnode 20480 2 ox02f10,cdns_csi2rx
    v4l2_async 24576 4 v4l2_fwnode,j721e_csi2rx,ox02f10,cdns_csi2rx
    videodev 245760 9 v4l2_async,j721e_csi2rx,ox02f10,videobuf2_v4l2,cdns_csi2rx,videobuf2_common,v4l2_mem2mem,e5010_jpeg_enc,wave5
    mc 57344 8 v4l2_async,videodev,j721e_csi2rx,ox02f10,videobuf2_v4l2,cdns_csi2rx,videobuf2_common,v4l2_mem2mem
    root@am62axx-evm:/# dmesg | grep -i ox02
    [ 12.059621] ox02f10: loading out-of-tree module taints kernel.
    [ 12.067283] ox02f10 2-0036: DEBUG: power_on entry
    [ 12.072087] ox02f10 2-0036: DEBUG: xclk enabled, rate=24000000
    [ 12.117496] ox02f10 2-0036: DEBUG: power_on complete
    [ 12.137817] ox02f10 2-0036: detected OX02F10, chip ID 0x5803
    [ 13.983067] ox02f10 2-0036: Consider updating driver ox02f10 to match on endpoints
    root@am62axx-evm:/# dmesg | grep -iE "ox02|camera|probe|i2c"
    [ 1.133367] i2c_dev: i2c /dev entries driver
    [ 1.384076] i2c 0-0048: Fixed dependency cycle(s) with /bus@f0000/i2c@20000000/pmic@48/regulators/buck5
    [ 1.393980] omap_i2c 20000000.i2c: bus 0 rev0.12 at 400 kHz
    [ 1.401713] omap_i2c 20020000.i2c: bus 1 rev0.12 at 400 kHz
    [ 1.409385] omap_i2c 20030000.i2c: bus 2 rev0.12 at 400 kHz
    [ 1.562983] spi-nand: probe of spi0.0 failed with error -524
    [ 5.569084] systemd[1]: Created slice Slice /system/modprobe.
    [ 12.059621] ox02f10: loading out-of-tree module taints kernel.
    [ 12.067283] ox02f10 2-0036: DEBUG: power_on entry
    [ 12.072087] ox02f10 2-0036: DEBUG: xclk enabled, rate=24000000
    [ 12.117496] ox02f10 2-0036: DEBUG: power_on complete
    [ 12.137817] ox02f10 2-0036: detected OX02F10, chip ID 0x5803
    [ 13.983067] ox02f10 2-0036: Consider updating driver ox02f10 to match on endpoints
    [ 13.994977] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 4/4 lanes, 4 streams, external D-PHY
    [ 24.255671] platform 30200000.dss: deferred probe pending
    root@am62axx-evm:/# media-ctl -p
    Media controller API version 6.1.80

    Media device information
    ------------------------
    driver j721e-csi2rx
    model TI-CSI2RX
    serial
    bus info platform:30102000.ticsi2rx
    hw revision 0x1
    driver version 6.1.80

    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev0
    routes:
    0/0 -> 1/0 [ACTIVE]
    pad0: Sink
    [stream:0 fmt:SRGGB10_1X10/1920x1080 field:none]
    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:SRGGB10_1X10/1920x1080 field:none]
    -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
    pad2: Source
    -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
    pad3: Source
    -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
    pad4: Source
    -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
    pad5: Source
    -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
    pad6: Source
    -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]

    - entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev1
    routes:
    0/0 -> 1/0 [ACTIVE]
    pad0: Sink
    [stream:0 fmt:SRGGB10_1X10/1920x1080 field:none]
    <- "ox02f10 2-0036":0 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:SRGGB10_1X10/1920x1080 field:none]
    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    pad2: Source
    pad3: Source
    pad4: Source

    - entity 15: ox02f10 2-0036 (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:unknown/0x0@1/30]
    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

    - entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video3
    pad0: Sink
    <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]

    - entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video4
    pad0: Sink
    <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]

    - entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video5
    pad0: Sink
    <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]

    - entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video6
    pad0: Sink
    <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]

    - entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video7
    pad0: Sink
    <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]

    - entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video8
    pad0: Sink
    <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

    root@am62axx-evm:/#

    Your guidance and support for brignup the camera is highly appreciated.

    Note: Regarding the SDK 9.2 version. As per our project needs we are using the Linux SDK 9.2.

    Thanks & Regards
    Undali Muniranga

  • HI Undali,

    - entity 15: ox02f10 2-0036 (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:unknown/0x0@1/30]
    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

    This seems to be the issue. The driver should set a default format for the sensor[1] and also implement the set_fmt callback to set the format[2][3]. You might also prefer to implement the get_fmt callback. I would suggest looking at the IMX219 driver and suggest that you are implementing all the V4L2 callbacks that it implements.

    Note: Regarding the SDK 9.2 version. As per our project needs we are using the Linux SDK 9.2.

    Can you please confirm if there is a particular issue with the newer SDKs that is not present in SDK 9.2. If there are any regressions, I will try to make sure that they get resolved in the newer SDKs.

    Regards,
    Jay

    [1] https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/i2c/imx219.c?h=ti-linux-6.1.y#n581 
    [2] https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/i2c/imx219.c?h=ti-linux-6.1.y#n809 
    [3] https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/i2c/imx219.c?h=ti-linux-6.1.y#n1254 

  • Hello  ,

    Thank you soo much for your support!!

    Now the driver is setting the default format. streaming is not happening i.e 30fps as per the requirement.

    Please find the attached detailed log for same and attached driver file for the same to review the changes. Regarding the Sensor registers, i have taken from the TI code.
    Sensor registers: https://git.ti.com/cgit/processor-sdk/imaging/tree/sensor_drv/src/ox02f10/ox02f10_sensor_config.h?h=ov_drivers

    Ox02f10 updated driver code: 

    // SPDX-License-Identifier: GPL-2.0
    /*
     * OmniVision OX02F10 image sensor driver
     *
     * The module register sequence and its nominal 1080p30 RAW10 mode are
     * retained from the board driver. Changes to the CSI-2 configuration or
     * timing require a matching register sequence from the module vendor.
     */
    #include <linux/clk.h>
    #include <linux/delay.h>
    #include <linux/gpio/consumer.h>
    #include <linux/i2c.h>
    #include <linux/module.h>
    #include <linux/mutex.h>
    #include <linux/pm_runtime.h>
    #include <linux/regmap.h>
    #include <media/v4l2-ctrls.h>
    #include <media/v4l2-device.h>
    #include <media/v4l2-event.h>
    #include <media/v4l2-fwnode.h>
    #include <media/v4l2-subdev.h>
    
    #define OX02F10_REG_MODE_SELECT		0x0100
    #define OX02F10_MODE_STANDBY		0x00
    #define OX02F10_MODE_STREAMING		0x01
    #define OX02F10_REG_SOFTWARE_RESET	0x0103
    #define OX02F10_REG_CHIP_ID		0x300a
    /* Register 0x300a contains 0x58; register 0x300b contains 0x03. */
    #define OX02F10_CHIP_ID			0x5803
    #define OX02F10_WIDTH			1920
    #define OX02F10_HEIGHT			1080
    #define OX02F10_FPS			30
    #define OX02F10_BITS_PER_PIXEL		10
    #define OX02F10_XCLK_FREQ		24000000
    #define OX02F10_NUM_DATA_LANES		4
    #define OX02F10_LINK_FREQ			480000000LL
    #define OX02F10_MEDIA_BUS_CODE		MEDIA_BUS_FMT_SRGGB10_1X10
    
    #define OX02F10_REG_EXPOSURE		0x3501
    #define OX02F10_REG_ANALOG_GAIN		0x3506
    #define OX02F10_VTS_DEFAULT		0x0250
    #define OX02F10_EXPOSURE_MIN		1
    #define OX02F10_EXPOSURE_DEFAULT		0x0187
    #define OX02F10_EXPOSURE_MARGIN		8
    
    /* Raw gain register encoding retained from the board driver. */
    #define OX02F10_ANALOG_GAIN_MIN		0x00
    #define OX02F10_ANALOG_GAIN_MAX		0xff
    #define OX02F10_ANALOG_GAIN_DEFAULT	0x30
    
    static const s64 ox02f10_link_freq_menu[] = {
    	OX02F10_LINK_FREQ,
    };
    
    static const struct regmap_config ox02f10_regmap_config = {
    	.reg_bits = 16,
    	.val_bits = 8,
    };
    
    static const struct reg_sequence ox02f10_1920x1080_regs[] = {
    	{ 0x0107, 0x01 }, { 0x4d5a, 0x1c }, { 0x4d09, 0xff }, { 0x4d09, 0xdf },
    	{ 0x3208, 0x04 }, { 0x4620, 0x04 }, { 0x3208, 0x14 }, { 0x3208, 0x05 },
    	{ 0x4620, 0x04 }, { 0x3208, 0x15 }, { 0x3208, 0x02 }, { 0x3507, 0x00 },
    	{ 0x3208, 0x12 }, { 0x3208, 0xa2 }, { 0x0301, 0xc8 }, { 0x0303, 0x03 },
    	{ 0x0304, 0x01 }, { 0x0305, 0x90 }, { 0x0306, 0x04 }, { 0x0307, 0x03 },
    	{ 0x0309, 0x02 }, { 0x0316, 0x00 }, { 0x0317, 0x00 }, { 0x0318, 0x00 },
    	{ 0x0323, 0x05 }, { 0x0324, 0x01 }, { 0x0325, 0x20 }, { 0x0362, 0x8e },
    	{ 0x0400, 0xe0 }, { 0x0401, 0x7e }, { 0x0403, 0xde }, { 0x0404, 0x34 },
    	{ 0x0405, 0x3e }, { 0x0406, 0x5c }, { 0x0407, 0x08 }, { 0x0408, 0xe0 },
    	{ 0x0409, 0x4e }, { 0x040a, 0xde }, { 0x040b, 0x34 }, { 0x040c, 0xb3 },
    	{ 0x040d, 0x72 }, { 0x040e, 0x08 }, { 0x2803, 0xfe }, { 0x280b, 0x00 },
    	{ 0x280c, 0x79 }, { 0x3001, 0x03 }, { 0x3002, 0xf8 }, { 0x3005, 0x80 },
    	{ 0x3007, 0x01 }, { 0x3008, 0x80 }, { 0x3012, 0x41 }, { 0x3020, 0x05 },
    	{ 0x3700, 0x28 }, { 0x3701, 0x15 }, { 0x3702, 0x19 }, { 0x3703, 0x23 },
    	{ 0x3704, 0x0a }, { 0x3705, 0x00 }, { 0x3706, 0x3e }, { 0x3707, 0x0d },
    	{ 0x3708, 0x50 }, { 0x3709, 0x5a }, { 0x370a, 0x00 }, { 0x370b, 0x96 },
    	{ 0x3711, 0x11 }, { 0x3712, 0x13 }, { 0x3717, 0x02 }, { 0x3718, 0x73 },
    	{ 0x372c, 0x40 }, { 0x3733, 0x01 }, { 0x3738, 0x36 }, { 0x3739, 0x36 },
    	{ 0x373a, 0x25 }, { 0x373b, 0x25 }, { 0x373f, 0x21 }, { 0x3740, 0x21 },
    	{ 0x3741, 0x21 }, { 0x3742, 0x21 }, { 0x3747, 0x28 }, { 0x3748, 0x28 },
    	{ 0x3749, 0x19 }, { 0x3755, 0x1a }, { 0x3756, 0x0a }, { 0x3757, 0x1c },
    	{ 0x3765, 0x19 }, { 0x3766, 0x05 }, { 0x3767, 0x05 }, { 0x3768, 0x13 },
    	{ 0x376c, 0x07 }, { 0x3778, 0x20 }, { 0x377c, 0xc8 }, { 0x3781, 0x02 },
    	{ 0x3783, 0x02 }, { 0x379c, 0x58 }, { 0x379e, 0x00 }, { 0x379f, 0x00 },
    	{ 0x37a0, 0x00 }, { 0x37bc, 0x22 }, { 0x37c0, 0x01 }, { 0x37c4, 0x3e },
    	{ 0x37c5, 0x3e }, { 0x37c6, 0x2a }, { 0x37c7, 0x28 }, { 0x37c8, 0x02 },
    	{ 0x37c9, 0x12 }, { 0x37cb, 0x29 }, { 0x37cd, 0x29 }, { 0x37d2, 0x00 },
    	{ 0x37d3, 0x73 }, { 0x37d6, 0x00 }, { 0x37d7, 0x6b }, { 0x37dc, 0x00 },
    	{ 0x37df, 0x54 }, { 0x37e2, 0x00 }, { 0x37e3, 0x00 }, { 0x37f8, 0x00 },
    	{ 0x37f9, 0x01 }, { 0x37fa, 0x00 }, { 0x37fb, 0x19 }, { 0x3c03, 0x01 },
    	{ 0x3c04, 0x01 }, { 0x3c06, 0x21 }, { 0x3c08, 0x01 }, { 0x3c09, 0x01 },
    	{ 0x3c0a, 0x01 }, { 0x3c0b, 0x21 }, { 0x3c13, 0x21 }, { 0x3c14, 0x82 },
    	{ 0x3c16, 0x13 }, { 0x3c21, 0x00 }, { 0x3c22, 0xf3 }, { 0x3c37, 0x12 },
    	{ 0x3c38, 0x31 }, { 0x3c3c, 0x00 }, { 0x3c3d, 0x03 }, { 0x3c44, 0x16 },
    	{ 0x3c5c, 0x8a }, { 0x3c5f, 0x03 }, { 0x3c61, 0x80 }, { 0x3c6f, 0x2b },
    	{ 0x3c70, 0x5f }, { 0x3c71, 0x2c }, { 0x3c72, 0x2c }, { 0x3c73, 0x2c },
    	{ 0x3c76, 0x12 }, { 0x3182, 0x12 }, { 0x320e, 0x00 }, { 0x320f, 0x00 },
    	{ 0x3211, 0x61 }, { 0x3215, 0xcd }, { 0x3219, 0x08 }, { 0x3506, 0x30 },
    	{ 0x350a, 0x01 }, { 0x350b, 0x00 }, { 0x350c, 0x00 }, { 0x3586, 0x60 },
    	{ 0x358a, 0x01 }, { 0x358b, 0x00 }, { 0x358c, 0x00 }, { 0x3541, 0x00 },
    	{ 0x3542, 0x04 }, { 0x3546, 0x20 }, { 0x3548, 0x04 }, { 0x3549, 0x40 },
    	{ 0x354a, 0x01 }, { 0x354b, 0x00 }, { 0x354c, 0x00 }, { 0x35c1, 0x00 },
    	{ 0x35c2, 0x02 }, { 0x35c6, 0xa0 }, { 0x3600, 0x8f }, { 0x3605, 0x16 },
    	{ 0x3609, 0xf0 }, { 0x360a, 0x01 }, { 0x360e, 0x1d }, { 0x360f, 0x10 },
    	{ 0x3610, 0x70 }, { 0x3611, 0x3a }, { 0x3612, 0x28 }, { 0x361a, 0x29 },
    	{ 0x361b, 0x6c }, { 0x361c, 0x0b }, { 0x361d, 0x00 }, { 0x361e, 0xfc },
    	{ 0x362a, 0x00 }, { 0x364d, 0x0f }, { 0x364e, 0x18 }, { 0x364f, 0x12 },
    	{ 0x3653, 0x1c }, { 0x3654, 0x00 }, { 0x3655, 0x1f }, { 0x3656, 0x1f },
    	{ 0x3657, 0x0c }, { 0x3658, 0x0a }, { 0x3659, 0x14 }, { 0x365a, 0x18 },
    	{ 0x365b, 0x14 }, { 0x365c, 0x10 }, { 0x365e, 0x12 }, { 0x3674, 0x08 },
    	{ 0x3677, 0x3a }, { 0x3678, 0x3a }, { 0x3679, 0x19 }, { 0x3802, 0x00 },
    	{ 0x3803, 0x68 }, { 0x3806, 0x04 }, { 0x3807, 0xa7 }, { 0x3808, 0x07 },
    	{ 0x3809, 0x80 }, { 0x380a, 0x04 }, { 0x380b, 0x38 }, { 0x380c, 0x09 },
    	{ 0x380d, 0xf8 }, { 0x380e, 0x02 }, { 0x380f, 0x50 }, { 0x3810, 0x00 },
    	{ 0x3811, 0x08 }, { 0x3812, 0x00 }, { 0x3813, 0x04 }, { 0x3816, 0x01 },
    	{ 0x3817, 0x01 }, { 0x381c, 0x18 }, { 0x381e, 0x01 }, { 0x381f, 0x01 },
    	{ 0x3820, 0x20 }, { 0x3821, 0x19 }, { 0x3832, 0x00 }, { 0x3834, 0x00 },
    	{ 0x384c, 0x04 }, { 0x384d, 0xc8 }, { 0x3850, 0x00 }, { 0x3851, 0x42 },
    	{ 0x3852, 0x00 }, { 0x3853, 0x40 }, { 0x3858, 0x04 }, { 0x388c, 0x05 },
    	{ 0x388d, 0x0e }, { 0x3b40, 0x05 }, { 0x3b41, 0x40 }, { 0x3b42, 0x00 },
    	{ 0x3b43, 0x90 }, { 0x3b44, 0x02 }, { 0x3b45, 0x00 }, { 0x3b46, 0x02 },
    	{ 0x3b47, 0x00 }, { 0x3b48, 0x19 }, { 0x3b49, 0x12 }, { 0x3b4a, 0x16 },
    	{ 0x3b4b, 0x2e }, { 0x3b4c, 0x03 }, { 0x3b4d, 0x00 }, { 0x3b86, 0x00 },
    	{ 0x3b87, 0x34 }, { 0x3b88, 0x00 }, { 0x3b89, 0x08 }, { 0x3b8a, 0x05 },
    	{ 0x3b8b, 0x00 }, { 0x3b8c, 0x07 }, { 0x3b8d, 0x80 }, { 0x3b8e, 0x00 },
    	{ 0x3b8f, 0x00 }, { 0x3b92, 0x05 }, { 0x3b93, 0x00 }, { 0x3b94, 0x07 },
    	{ 0x3b95, 0x80 }, { 0x3b9e, 0x09 }, { 0x3d85, 0x05 }, { 0x3d8a, 0x03 },
    	{ 0x3d8b, 0xff }, { 0x3d99, 0x00 }, { 0x3d9a, 0x9f }, { 0x3d9b, 0x00 },
    	{ 0x3d9c, 0xa0 }, { 0x3da4, 0x00 }, { 0x3da7, 0x50 }, { 0x420e, 0x6b },
    	{ 0x420f, 0x6e }, { 0x4210, 0x06 }, { 0x4211, 0xc1 }, { 0x421e, 0x02 },
    	{ 0x421f, 0x45 }, { 0x4220, 0xe1 }, { 0x4221, 0x01 }, { 0x4301, 0xff },
    	{ 0x4307, 0x03 }, { 0x4308, 0x13 }, { 0x430a, 0x13 }, { 0x430d, 0x93 },
    	{ 0x430f, 0x57 }, { 0x4310, 0x95 }, { 0x4311, 0x16 }, { 0x4316, 0x00 },
    	{ 0x4317, 0x38 }, { 0x4319, 0x03 }, { 0x431a, 0x00 }, { 0x431b, 0x00 },
    	{ 0x431d, 0x2a }, { 0x431e, 0x11 }, { 0x431f, 0x20 }, { 0x4320, 0x19 },
    	{ 0x4323, 0x80 }, { 0x4324, 0x00 }, { 0x4503, 0x4e }, { 0x4505, 0x00 },
    	{ 0x4509, 0x00 }, { 0x450a, 0x00 }, { 0x4580, 0xf8 }, { 0x4583, 0x07 },
    	{ 0x4584, 0x6a }, { 0x4585, 0x08 }, { 0x4586, 0x05 }, { 0x4587, 0x04 },
    	{ 0x4588, 0x73 }, { 0x4589, 0x05 }, { 0x458a, 0x1f }, { 0x458b, 0x02 },
    	{ 0x458c, 0xdc }, { 0x458d, 0x03 }, { 0x458e, 0x02 }, { 0x4597, 0x07 },
    	{ 0x4598, 0x40 }, { 0x4599, 0x0e }, { 0x459a, 0x0e }, { 0x459b, 0xf5 },
    	{ 0x459c, 0xf1 }, { 0x4602, 0x00 }, { 0x4603, 0x13 }, { 0x4604, 0x00 },
    	{ 0x4609, 0x0a }, { 0x460a, 0x30 }, { 0x4610, 0x00 }, { 0x4611, 0x40 },
    	{ 0x4612, 0x01 }, { 0x4613, 0x00 }, { 0x4614, 0x00 }, { 0x4615, 0x40 },
    	{ 0x4616, 0x01 }, { 0x4617, 0x00 }, { 0x4800, 0x04 }, { 0x480a, 0x22 },
    	{ 0x4813, 0xe4 }, { 0x4814, 0x2a }, { 0x4837, 0x20 }, { 0x484b, 0x47 },
    	{ 0x484f, 0x00 }, { 0x4887, 0x51 }, { 0x4d00, 0x4a }, { 0x4d01, 0x18 },
    	{ 0x4d05, 0xff }, { 0x4d06, 0x88 }, { 0x4d08, 0x63 }, { 0x4d09, 0xdf },
    	{ 0x4d15, 0x7d }, { 0x4d1a, 0x20 }, { 0x4d30, 0x0a }, { 0x4d31, 0x00 },
    	{ 0x4d34, 0x7d }, { 0x4d3c, 0x7d }, { 0x4f00, 0x7f }, { 0x4f01, 0xff },
    	{ 0x4f02, 0xff }, { 0x4f03, 0x20 }, { 0x4f04, 0xe0 }, { 0x6a00, 0x00 },
    	{ 0x6a01, 0x20 }, { 0x6a02, 0x00 }, { 0x6a03, 0x20 }, { 0x6a04, 0x02 },
    	{ 0x6a05, 0x80 }, { 0x6a06, 0x01 }, { 0x6a07, 0xe0 }, { 0x6a08, 0xcf },
    	{ 0x6a09, 0x01 }, { 0x6a0a, 0x40 }, { 0x6a20, 0x00 }, { 0x6a21, 0x02 },
    	{ 0x6a22, 0x00 }, { 0x6a23, 0x00 }, { 0x6a24, 0x00 }, { 0x6a25, 0x00 },
    	{ 0x6a26, 0x00 }, { 0x6a27, 0x00 }, { 0x6a28, 0x00 }, { 0x5000, 0x8f },
    	{ 0x5001, 0x75 }, { 0x5002, 0x7f }, { 0x5003, 0x7a }, { 0x5004, 0x3e },
    	{ 0x5005, 0x1e }, { 0x5006, 0x1e }, { 0x5007, 0x1e }, { 0x5008, 0x00 },
    	{ 0x500c, 0x00 }, { 0x502c, 0x00 }, { 0x502e, 0x00 }, { 0x502f, 0x00 },
    	{ 0x504b, 0x00 }, { 0x5053, 0x00 }, { 0x505b, 0x00 }, { 0x5063, 0x00 },
    	{ 0x5070, 0x00 }, { 0x5074, 0x04 }, { 0x507a, 0x04 }, { 0x507b, 0x09 },
    	{ 0x5500, 0x02 }, { 0x5700, 0x02 }, { 0x5900, 0x02 }, { 0x6007, 0x04 },
    	{ 0x6008, 0x05 }, { 0x6009, 0x02 }, { 0x600b, 0x08 }, { 0x600c, 0x07 },
    	{ 0x600d, 0x88 }, { 0x6016, 0x00 }, { 0x6027, 0x04 }, { 0x6028, 0x05 },
    	{ 0x6029, 0x02 }, { 0x602b, 0x08 }, { 0x602c, 0x07 }, { 0x602d, 0x88 },
    	{ 0x6047, 0x04 }, { 0x6048, 0x05 }, { 0x6049, 0x02 }, { 0x604b, 0x08 },
    	{ 0x604c, 0x07 }, { 0x604d, 0x88 }, { 0x6067, 0x04 }, { 0x6068, 0x05 },
    	{ 0x6069, 0x02 }, { 0x606b, 0x08 }, { 0x606c, 0x07 }, { 0x606d, 0x88 },
    	{ 0x6087, 0x04 }, { 0x6088, 0x05 }, { 0x6089, 0x02 }, { 0x608b, 0x08 },
    	{ 0x608c, 0x07 }, { 0x608d, 0x88 }, { 0x5e00, 0x00 }, { 0x5e01, 0x09 },
    	{ 0x5e02, 0x09 }, { 0x5e03, 0x0a }, { 0x5e04, 0x0a }, { 0x5e05, 0x0a },
    	{ 0x5e06, 0x0b }, { 0x5e07, 0x0b }, { 0x5e08, 0x0c }, { 0x5e09, 0x0c },
    	{ 0x5e0a, 0x0d }, { 0x5e0b, 0x0d }, { 0x5e0c, 0x0e }, { 0x5e0d, 0x0e },
    	{ 0x5e0e, 0x0f }, { 0x5e0f, 0x0f }, { 0x5e10, 0x10 }, { 0x5e11, 0x10 },
    	{ 0x5e12, 0x11 }, { 0x5e13, 0x11 }, { 0x5e14, 0x12 }, { 0x5e15, 0x12 },
    	{ 0x5e16, 0x12 }, { 0x5e17, 0x12 }, { 0x5e18, 0x13 }, { 0x5e19, 0x13 },
    	{ 0x5e1a, 0x13 }, { 0x5e1b, 0x14 }, { 0x5e1c, 0x14 }, { 0x5e1d, 0x14 },
    	{ 0x5e1e, 0x15 }, { 0x5e1f, 0x15 }, { 0x5e20, 0x15 }, { 0x5e21, 0x16 },
    	{ 0x5e22, 0x00 }, { 0x5e23, 0x02 }, { 0x5e26, 0x00 }, { 0x5e27, 0xff },
    	{ 0x5e29, 0x01 }, { 0x5e2a, 0x00 }, { 0x5e2c, 0x01 }, { 0x5e2d, 0x00 },
    	{ 0x5e2f, 0x01 }, { 0x5e30, 0x00 }, { 0x5e32, 0x00 }, { 0x5e33, 0x80 },
    	{ 0x5e34, 0x00 }, { 0x5e35, 0x00 }, { 0x5e36, 0x80 }, { 0x5e37, 0x00 },
    	{ 0x5e38, 0x00 }, { 0x5e39, 0x80 }, { 0x5e3a, 0x00 }, { 0x5e3b, 0x00 },
    	{ 0x5e3c, 0x80 }, { 0x5e3d, 0x00 }, { 0x5e3e, 0x00 }, { 0x5e3f, 0x80 },
    	{ 0x5e40, 0x00 }, { 0x5e41, 0x00 }, { 0x5e42, 0x80 }, { 0x5e43, 0x00 },
    	{ 0x5e44, 0x00 }, { 0x5e45, 0x80 }, { 0x5e46, 0x00 }, { 0x5e47, 0x00 },
    	{ 0x5e48, 0x80 }, { 0x5e49, 0x00 }, { 0x5e4a, 0x00 }, { 0x5e4b, 0x80 },
    	{ 0x5e4c, 0x00 }, { 0x5e4d, 0x00 }, { 0x5e4e, 0x80 }, { 0x5e50, 0x00 },
    	{ 0x5e51, 0x80 }, { 0x5e53, 0x00 }, { 0x5e54, 0x80 }, { 0x5e56, 0x00 },
    	{ 0x5e57, 0x40 }, { 0x5e59, 0x00 }, { 0x5e5a, 0x40 }, { 0x5e5c, 0x00 },
    	{ 0x5e5d, 0x40 }, { 0x5e5f, 0x00 }, { 0x5e60, 0x40 }, { 0x5e62, 0x00 },
    	{ 0x5e63, 0x40 }, { 0x5e65, 0x00 }, { 0x5e66, 0x40 }, { 0x5e68, 0x00 },
    	{ 0x5e69, 0x40 }, { 0x5e6b, 0x00 }, { 0x5e6c, 0x40 }, { 0x5e6e, 0x00 },
    	{ 0x5e6f, 0x40 }, { 0x5e71, 0x00 }, { 0x5e72, 0x40 }, { 0x5e74, 0x00 },
    	{ 0x5e75, 0x40 }, { 0x5e77, 0x00 }, { 0x5e78, 0x40 }, { 0x5e7a, 0x00 },
    	{ 0x5e7b, 0x40 }, { 0x5e7d, 0x00 }, { 0x5e7e, 0x40 }, { 0x5e80, 0x00 },
    	{ 0x5e81, 0x40 }, { 0x5e83, 0x00 }, { 0x5e84, 0x40 }, { 0x5f00, 0x02 },
    	{ 0x5f01, 0x08 }, { 0x5f02, 0x09 }, { 0x5f03, 0x0a }, { 0x5f04, 0x0b },
    	{ 0x5f05, 0x0c }, { 0x5f06, 0x0c }, { 0x5f07, 0x0c }, { 0x5f08, 0x0c },
    	{ 0x5f09, 0x0c }, { 0x5f0a, 0x0d }, { 0x5f0b, 0x0d }, { 0x5f0c, 0x0d },
    	{ 0x5f0d, 0x0d }, { 0x5f0e, 0x0d }, { 0x5f0f, 0x0e }, { 0x5f10, 0x0e },
    	{ 0x5f11, 0x0e }, { 0x5f12, 0x0e }, { 0x5f13, 0x0f }, { 0x5f14, 0x0f },
    	{ 0x5f15, 0x10 }, { 0x5f16, 0x11 }, { 0x5f17, 0x11 }, { 0x5f18, 0x12 },
    	{ 0x5f19, 0x12 }, { 0x5f1a, 0x13 }, { 0x5f1b, 0x13 }, { 0x5f1c, 0x14 },
    	{ 0x5f1d, 0x14 }, { 0x5f1e, 0x16 }, { 0x5f1f, 0x16 }, { 0x5f20, 0x16 },
    	{ 0x5f21, 0x08 }, { 0x5f22, 0x00 }, { 0x5f23, 0x01 }, { 0x5f26, 0x02 },
    	{ 0x5f27, 0x00 }, { 0x5f29, 0x02 }, { 0x5f2a, 0x00 }, { 0x5f2c, 0x02 },
    	{ 0x5f2d, 0x00 }, { 0x5f2f, 0x02 }, { 0x5f30, 0x00 }, { 0x5f32, 0x02 },
    	{ 0x5f33, 0x00 }, { 0x5f34, 0x00 }, { 0x5f35, 0x02 }, { 0x5f36, 0x00 },
    	{ 0x5f37, 0x00 }, { 0x5f38, 0x02 }, { 0x5f39, 0x00 }, { 0x5f3a, 0x00 },
    	{ 0x5f3b, 0x02 }, { 0x5f3c, 0x00 }, { 0x5f3d, 0x00 }, { 0x5f3e, 0x02 },
    	{ 0x5f3f, 0x00 }, { 0x5f40, 0x00 }, { 0x5f41, 0x02 }, { 0x5f42, 0x00 },
    	{ 0x5f43, 0x00 }, { 0x5f44, 0x02 }, { 0x5f45, 0x00 }, { 0x5f46, 0x00 },
    	{ 0x5f47, 0x04 }, { 0x5f48, 0x00 }, { 0x5f49, 0x00 }, { 0x5f4a, 0x04 },
    	{ 0x5f4b, 0x00 }, { 0x5f4c, 0x00 }, { 0x5f4d, 0x04 }, { 0x5f4e, 0x00 },
    	{ 0x5f50, 0x04 }, { 0x5f51, 0x00 }, { 0x5f53, 0x04 }, { 0x5f54, 0x00 },
    	{ 0x5f56, 0x04 }, { 0x5f57, 0x00 }, { 0x5f59, 0x04 }, { 0x5f5a, 0x00 },
    	{ 0x5f5c, 0x04 }, { 0x5f5d, 0x00 }, { 0x5f5f, 0x08 }, { 0x5f60, 0x00 },
    	{ 0x5f62, 0x08 }, { 0x5f63, 0x00 }, { 0x5f65, 0x08 }, { 0x5f66, 0x00 },
    	{ 0x5f68, 0x08 }, { 0x5f69, 0x00 }, { 0x5f6b, 0x08 }, { 0x5f6c, 0x00 },
    	{ 0x5f6e, 0x10 }, { 0x5f6f, 0x00 }, { 0x5f71, 0x10 }, { 0x5f72, 0x00 },
    	{ 0x5f74, 0x10 }, { 0x5f75, 0x00 }, { 0x5f77, 0x10 }, { 0x5f78, 0x00 },
    	{ 0x5f7a, 0x20 }, { 0x5f7b, 0x00 }, { 0x5f7d, 0x20 }, { 0x5f7e, 0x00 },
    	{ 0x5f80, 0x20 }, { 0x5f81, 0x00 }, { 0x5f83, 0x00 }, { 0x5f84, 0xff },
    	{ 0x5240, 0x0f }, { 0x5243, 0x00 }, { 0x5244, 0x00 }, { 0x5245, 0x00 },
    	{ 0x5246, 0x00 }, { 0x5247, 0x00 }, { 0x5248, 0x00 }, { 0x5249, 0x00 },
    	{ 0x5440, 0x0f }, { 0x5443, 0x00 }, { 0x5445, 0x00 }, { 0x5447, 0x00 },
    	{ 0x5448, 0x00 }, { 0x5449, 0x00 }, { 0x5640, 0x0f }, { 0x5642, 0x00 },
    	{ 0x5643, 0x00 }, { 0x5644, 0x00 }, { 0x5645, 0x00 }, { 0x5646, 0x00 },
    	{ 0x5647, 0x00 }, { 0x5649, 0x00 }, { 0x5840, 0x0f }, { 0x5842, 0x00 },
    	{ 0x5843, 0x00 }, { 0x5845, 0x00 }, { 0x5846, 0x00 }, { 0x5847, 0x00 },
    	{ 0x5848, 0x00 }, { 0x5849, 0x00 }, { 0x4001, 0x2b }, { 0x4008, 0x02 },
    	{ 0x4009, 0x03 }, { 0x4018, 0x12 }, { 0x4022, 0x40 }, { 0x4023, 0x20 },
    	{ 0x4026, 0x00 }, { 0x4027, 0x40 }, { 0x4028, 0x00 }, { 0x4029, 0x40 },
    	{ 0x402a, 0x00 }, { 0x402b, 0x40 }, { 0x402c, 0x00 }, { 0x402d, 0x40 },
    	{ 0x405e, 0x00 }, { 0x405f, 0x00 }, { 0x4060, 0x00 }, { 0x4061, 0x00 },
    	{ 0x4062, 0x00 }, { 0x4063, 0x00 }, { 0x4064, 0x00 }, { 0x4065, 0x00 },
    	{ 0x4066, 0x00 }, { 0x4067, 0x00 }, { 0x4068, 0x00 }, { 0x4069, 0x00 },
    	{ 0x406a, 0x00 }, { 0x406b, 0x00 }, { 0x406c, 0x00 }, { 0x406d, 0x00 },
    	{ 0x406e, 0x00 }, { 0x406f, 0x00 }, { 0x4070, 0x00 }, { 0x4071, 0x00 },
    	{ 0x4072, 0x00 }, { 0x4073, 0x00 }, { 0x4074, 0x00 }, { 0x4075, 0x00 },
    	{ 0x4076, 0x00 }, { 0x4077, 0x00 }, { 0x4078, 0x00 }, { 0x4079, 0x00 },
    	{ 0x407a, 0x00 }, { 0x407b, 0x00 }, { 0x407c, 0x00 }, { 0x407d, 0x00 },
    	{ 0x407e, 0xcc }, { 0x407f, 0x18 }, { 0x4080, 0xff }, { 0x4081, 0xff },
    	{ 0x4082, 0x01 }, { 0x4083, 0x53 }, { 0x4084, 0x01 }, { 0x4085, 0x2b },
    	{ 0x4086, 0x00 }, { 0x4087, 0xb3 }, { 0x4640, 0x40 }, { 0x4641, 0x11 },
    	{ 0x4642, 0x0e }, { 0x4643, 0xee }, { 0x4646, 0x0f }, { 0x4648, 0x00 },
    	{ 0x4649, 0x03 }, { 0x4d09, 0xff }, { 0x4d09, 0xdf }, { 0x5019, 0x00 },
    	{ 0x501a, 0xff }, { 0x501b, 0xff }, { 0x501d, 0x00 }, { 0x501e, 0x23 },
    	{ 0x501f, 0x8e }, { 0x5021, 0x00 }, { 0x5022, 0x00 }, { 0x5023, 0x50 },
    	{ 0x5025, 0x00 }, { 0x5026, 0x23 }, { 0x5027, 0x8e }, { 0x5003, 0x7a },
    	{ 0x5b80, 0x08 }, { 0x5c00, 0x08 }, { 0x5c80, 0x00 }, { 0x5bbe, 0x12 },
    	{ 0x5c3e, 0x12 }, { 0x5cbe, 0x12 }, { 0x5b8a, 0x80 }, { 0x5b8b, 0x80 },
    	{ 0x5b8c, 0x80 }, { 0x5b8d, 0x80 }, { 0x5b8e, 0x80 }, { 0x5b8f, 0x40 },
    	{ 0x5b90, 0x80 }, { 0x5b91, 0x80 }, { 0x5b92, 0x80 }, { 0x5b93, 0x60 },
    	{ 0x5b94, 0x00 }, { 0x5b95, 0x00 }, { 0x5b96, 0x40 }, { 0x5b97, 0x80 },
    	{ 0x5b98, 0x10 }, { 0x5b99, 0x00 }, { 0x5b9a, 0x00 }, { 0x5b9b, 0x00 },
    	{ 0x5b9c, 0x00 }, { 0x5b9d, 0x00 }, { 0x5b9e, 0x00 }, { 0x5b9f, 0x00 },
    	{ 0x5ba0, 0x00 }, { 0x5ba1, 0x00 }, { 0x5ba2, 0x00 }, { 0x5ba3, 0x00 },
    	{ 0x5ba4, 0x00 }, { 0x5ba5, 0x00 }, { 0x5ba6, 0x00 }, { 0x5ba7, 0x00 },
    	{ 0x5ba8, 0x00 }, { 0x5ba9, 0xc0 }, { 0x5baa, 0x01 }, { 0x5bab, 0x40 },
    	{ 0x5bac, 0x02 }, { 0x5bad, 0x40 }, { 0x5bae, 0x00 }, { 0x5baf, 0x50 },
    	{ 0x5bb0, 0x00 }, { 0x5bb1, 0x60 }, { 0x5bb2, 0x00 }, { 0x5bb3, 0xc0 },
    	{ 0x5c0a, 0x80 }, { 0x5c0b, 0x80 }, { 0x5c0c, 0x80 }, { 0x5c0d, 0x80 },
    	{ 0x5c0e, 0x60 }, { 0x5c0f, 0x80 }, { 0x5c10, 0x80 }, { 0x5c11, 0x80 },
    	{ 0x5c12, 0x60 }, { 0x5c13, 0x20 }, { 0x5c14, 0x80 }, { 0x5c15, 0x80 },
    	{ 0x5c16, 0x80 }, { 0x5c17, 0x20 }, { 0x5c18, 0x00 }, { 0x5c19, 0x80 },
    	{ 0x5c1a, 0x40 }, { 0x5c1b, 0x20 }, { 0x5c1c, 0x00 }, { 0x5c1d, 0x00 },
    	{ 0x5c1e, 0x80 }, { 0x5c1f, 0x00 }, { 0x5c20, 0x00 }, { 0x5c21, 0x00 },
    	{ 0x5c22, 0x00 }, { 0x5c23, 0x00 }, { 0x5c24, 0x00 }, { 0x5c25, 0x00 },
    	{ 0x5c26, 0x00 }, { 0x5c27, 0x00 }, { 0x5c28, 0x02 }, { 0x5c29, 0x00 },
    	{ 0x5c2a, 0x02 }, { 0x5c2b, 0x76 }, { 0x5c2c, 0x03 }, { 0x5c2d, 0x08 },
    	{ 0x5c2e, 0x00 }, { 0x5c2f, 0x80 }, { 0x5c30, 0x01 }, { 0x5c31, 0x00 },
    	{ 0x5c32, 0x02 }, { 0x5c33, 0x00 }, { 0x5c8a, 0x80 }, { 0x5c8b, 0x80 },
    	{ 0x5c8c, 0x80 }, { 0x5c8d, 0x80 }, { 0x5c8e, 0x80 }, { 0x5c8f, 0x80 },
    	{ 0x5c90, 0x80 }, { 0x5c91, 0x80 }, { 0x5c92, 0x80 }, { 0x5c93, 0x60 },
    	{ 0x5c94, 0x80 }, { 0x5c95, 0x80 }, { 0x5c96, 0x80 }, { 0x5c97, 0x60 },
    	{ 0x5c98, 0x40 }, { 0x5c99, 0x80 }, { 0x5c9a, 0x80 }, { 0x5c9b, 0x80 },
    	{ 0x5c9c, 0x40 }, { 0x5c9d, 0x20 }, { 0x5c9e, 0x80 }, { 0x5c9f, 0x80 },
    	{ 0x5ca0, 0x80 }, { 0x5ca1, 0x20 }, { 0x5ca2, 0x00 }, { 0x5ca3, 0x80 },
    	{ 0x5ca4, 0x80 }, { 0x5ca5, 0x80 }, { 0x5ca6, 0x00 }, { 0x5ca7, 0x00 },
    	{ 0x5ca8, 0x01 }, { 0x5ca9, 0x00 }, { 0x5caa, 0x02 }, { 0x5cab, 0x00 },
    	{ 0x5cac, 0x03 }, { 0x5cad, 0x08 }, { 0x5cae, 0x01 }, { 0x5caf, 0x00 },
    	{ 0x5cb0, 0x02 }, { 0x5cb1, 0x00 }, { 0x5cb2, 0x03 }, { 0x5cb3, 0x08 },
    	{ 0x5be7, 0x80 }, { 0x5bc9, 0x80 }, { 0x5bca, 0x80 }, { 0x5bcb, 0x80 },
    	{ 0x5bcc, 0x80 }, { 0x5bcd, 0x80 }, { 0x5bce, 0x80 }, { 0x5bcf, 0x80 },
    	{ 0x5bd0, 0x80 }, { 0x5bd1, 0x80 }, { 0x5bd2, 0x20 }, { 0x5bd3, 0x80 },
    	{ 0x5bd4, 0x40 }, { 0x5bd5, 0x20 }, { 0x5bd6, 0x00 }, { 0x5bd7, 0x00 },
    	{ 0x5bd8, 0x00 }, { 0x5bd9, 0x00 }, { 0x5bda, 0x00 }, { 0x5bdb, 0x00 },
    	{ 0x5bdc, 0x00 }, { 0x5bdd, 0x00 }, { 0x5bde, 0x00 }, { 0x5bdf, 0x00 },
    	{ 0x5be0, 0x00 }, { 0x5be1, 0x00 }, { 0x5be2, 0x00 }, { 0x5be3, 0x00 },
    	{ 0x5be4, 0x00 }, { 0x5be5, 0x00 }, { 0x5be6, 0x00 }, { 0x5c49, 0x80 },
    	{ 0x5c4a, 0x80 }, { 0x5c4b, 0x80 }, { 0x5c4c, 0x80 }, { 0x5c4d, 0x40 },
    	{ 0x5c4e, 0x80 }, { 0x5c4f, 0x80 }, { 0x5c50, 0x80 }, { 0x5c51, 0x60 },
    	{ 0x5c52, 0x20 }, { 0x5c53, 0x80 }, { 0x5c54, 0x80 }, { 0x5c55, 0x80 },
    	{ 0x5c56, 0x20 }, { 0x5c57, 0x00 }, { 0x5c58, 0x80 }, { 0x5c59, 0x40 },
    	{ 0x5c5a, 0x20 }, { 0x5c5b, 0x00 }, { 0x5c5c, 0x00 }, { 0x5c5d, 0x80 },
    	{ 0x5c5e, 0x00 }, { 0x5c5f, 0x00 }, { 0x5c60, 0x00 }, { 0x5c61, 0x00 },
    	{ 0x5c62, 0x00 }, { 0x5c63, 0x00 }, { 0x5c64, 0x00 }, { 0x5c65, 0x00 },
    	{ 0x5c66, 0x00 }, { 0x5cc9, 0x80 }, { 0x5cca, 0x80 }, { 0x5ccb, 0x80 },
    	{ 0x5ccc, 0x80 }, { 0x5ccd, 0x80 }, { 0x5cce, 0x80 }, { 0x5ccf, 0x80 },
    	{ 0x5cd0, 0x80 }, { 0x5cd1, 0x80 }, { 0x5cd2, 0x60 }, { 0x5cd3, 0x80 },
    	{ 0x5cd4, 0x80 }, { 0x5cd5, 0x80 }, { 0x5cd6, 0x60 }, { 0x5cd7, 0x40 },
    	{ 0x5cd8, 0x80 }, { 0x5cd9, 0x80 }, { 0x5cda, 0x80 }, { 0x5cdb, 0x40 },
    	{ 0x5cdc, 0x20 }, { 0x5cdd, 0x80 }, { 0x5cde, 0x80 }, { 0x5cdf, 0x80 },
    	{ 0x5ce0, 0x20 }, { 0x5ce1, 0x00 }, { 0x5ce2, 0x80 }, { 0x5ce3, 0x80 },
    	{ 0x5ce4, 0x80 }, { 0x5ce5, 0x00 }, { 0x5ce6, 0x00 }, { 0x5b84, 0x02 },
    	{ 0x5b85, 0xcc }, { 0x5bb4, 0x05 }, { 0x5bb5, 0xc6 }, { 0x5c04, 0x02 },
    	{ 0x5c05, 0xcc }, { 0x5c34, 0x05 }, { 0x5c35, 0x33 }, { 0x5c84, 0x02 },
    	{ 0x5c85, 0xcc }, { 0x5cb4, 0x05 }, { 0x5cb5, 0x33 }, { 0x5bbf, 0x00 },
    	{ 0x5bc0, 0x04 }, { 0x5bc1, 0x06 }, { 0x5bc2, 0xff }, { 0x5bc3, 0x00 },
    	{ 0x5bc4, 0x04 }, { 0x5bc5, 0x02 }, { 0x5bc6, 0xb8 }, { 0x5c3f, 0x00 },
    	{ 0x5c40, 0x04 }, { 0x5c41, 0x07 }, { 0x5c42, 0xff }, { 0x5c43, 0x00 },
    	{ 0x5c44, 0x04 }, { 0x5c45, 0x03 }, { 0x5c46, 0xb8 }, { 0x5cbf, 0x00 },
    	{ 0x5cc0, 0x20 }, { 0x5cc1, 0x07 }, { 0x5cc2, 0xff }, { 0x5cc3, 0x00 },
    	{ 0x5cc4, 0x20 }, { 0x5cc5, 0x03 }, { 0x5cc6, 0x00 }, { 0x5b86, 0x05 },
    	{ 0x5c06, 0x05 }, { 0x5c86, 0x05 }, { 0x5bb8, 0x01 }, { 0x5bb9, 0x01 },
    	{ 0x5c38, 0x01 }, { 0x5c39, 0x01 }, { 0x5cb8, 0x01 }, { 0x5cb9, 0x01 },
    	{ 0x5bc7, 0x00 }, { 0x5bc8, 0x80 }, { 0x5c47, 0x00 }, { 0x5c48, 0x80 },
    	{ 0x5cc7, 0x00 }, { 0x5cc8, 0x80 }, { 0x5bba, 0x01 }, { 0x5bbb, 0x00 },
    	{ 0x5c3a, 0x01 }, { 0x5c3b, 0x00 }, { 0x5cba, 0x01 }, { 0x5cbb, 0x00 },
    	{ 0x5d74, 0x01 }, { 0x5d75, 0x00 }, { 0x5d1f, 0x81 }, { 0x5d11, 0x00 },
    	{ 0x5d12, 0x10 }, { 0x5d13, 0x10 }, { 0x5d15, 0x05 }, { 0x5d16, 0x05 },
    	{ 0x5d17, 0x05 }, { 0x5d08, 0x03 }, { 0x5d09, 0x6b }, { 0x5d0a, 0x03 },
    	{ 0x5d0b, 0x6b }, { 0x5d18, 0x03 }, { 0x5d19, 0x6b }, { 0x5b40, 0x01 },
    	{ 0x5b41, 0x00 }, { 0x5b42, 0x00 }, { 0x5b43, 0x00 }, { 0x5b44, 0x00 },
    	{ 0x5b45, 0x00 }, { 0x5b46, 0x00 }, { 0x5b47, 0x00 }, { 0x5b48, 0x01 },
    	{ 0x5b49, 0x00 }, { 0x5b4a, 0x00 }, { 0x5b4b, 0x00 }, { 0x5b4c, 0x00 },
    	{ 0x5b4d, 0x00 }, { 0x5b4e, 0x00 }, { 0x5b4f, 0x00 }, { 0x5b50, 0x01 },
    	{ 0x5b51, 0x00 }, { 0x5b52, 0x01 }, { 0x5b53, 0x00 }, { 0x5b54, 0x00 },
    	{ 0x5b55, 0x00 }, { 0x5b56, 0x00 }, { 0x5b57, 0x00 }, { 0x5b58, 0x00 },
    	{ 0x5b59, 0x00 }, { 0x5b5a, 0x01 }, { 0x5b5b, 0x00 }, { 0x5b5c, 0x00 },
    	{ 0x5b5d, 0x00 }, { 0x5b5e, 0x00 }, { 0x5b5f, 0x00 }, { 0x5b60, 0x00 },
    	{ 0x5b61, 0x00 }, { 0x5b62, 0x01 }, { 0x5b63, 0x00 }, { 0x5b64, 0x01 },
    	{ 0x5b65, 0x00 }, { 0x5b66, 0x00 }, { 0x5b67, 0x00 }, { 0x5b68, 0x00 },
    	{ 0x5b69, 0x00 }, { 0x5b6a, 0x00 }, { 0x5b6b, 0x00 }, { 0x5b6c, 0x01 },
    	{ 0x5b6d, 0x00 }, { 0x5b6e, 0x00 }, { 0x5b6f, 0x00 }, { 0x5b70, 0x00 },
    	{ 0x5b71, 0x00 }, { 0x5b72, 0x00 }, { 0x5b73, 0x00 }, { 0x5b74, 0x01 },
    	{ 0x5b75, 0x00 }, { 0x5b78, 0x00 }, { 0x5b79, 0x4c }, { 0x5b7a, 0x00 },
    	{ 0x5b7b, 0xb9 }, { 0x5b7c, 0x01 }, { 0x5b7d, 0x38 }, { 0x5b7e, 0x01 },
    	{ 0x5280, 0x04 }, { 0x5281, 0x00 }, { 0x5282, 0x04 }, { 0x5283, 0x00 },
    	{ 0x5284, 0x04 }, { 0x5285, 0x00 }, { 0x5286, 0x04 }, { 0x5287, 0x00 },
    	{ 0x5480, 0x04 }, { 0x5481, 0x00 }, { 0x5482, 0x04 }, { 0x5483, 0x00 },
    	{ 0x5484, 0x04 }, { 0x5485, 0x00 }, { 0x5486, 0x04 }, { 0x5487, 0x00 },
    	{ 0x5680, 0x04 }, { 0x5681, 0x00 }, { 0x5682, 0x04 }, { 0x5683, 0x00 },
    	{ 0x5684, 0x04 }, { 0x5685, 0x00 }, { 0x5686, 0x04 }, { 0x5687, 0x00 },
    	{ 0x5880, 0x04 }, { 0x5881, 0x00 }, { 0x5882, 0x04 }, { 0x5883, 0x00 },
    	{ 0x5884, 0x04 }, { 0x5885, 0x00 }, { 0x5886, 0x04 }, { 0x5887, 0x00 },
    	{ 0x52c6, 0x00 }, { 0x52c7, 0x12 }, { 0x52c8, 0x04 }, { 0x52c9, 0x02 },
    	{ 0x52ca, 0x01 }, { 0x52cb, 0x01 }, { 0x52cc, 0x04 }, { 0x52cd, 0x02 },
    	{ 0x52ce, 0x01 }, { 0x52cf, 0x01 }, { 0x52d0, 0x03 }, { 0x52d1, 0x08 },
    	{ 0x52d2, 0x0c }, { 0x54c6, 0x00 }, { 0x54c7, 0x12 }, { 0x54c8, 0x04 },
    	{ 0x54c9, 0x02 }, { 0x54ca, 0x01 }, { 0x54cb, 0x01 }, { 0x54cc, 0x04 },
    	{ 0x54cd, 0x02 }, { 0x54ce, 0x01 }, { 0x54cf, 0x01 }, { 0x54d0, 0x03 },
    	{ 0x54d1, 0x08 }, { 0x54d2, 0x0c }, { 0x56c6, 0x00 }, { 0x56c7, 0x12 },
    	{ 0x56c8, 0x04 }, { 0x56c9, 0x02 }, { 0x56ca, 0x01 }, { 0x56cb, 0x01 },
    	{ 0x56cc, 0x04 }, { 0x56cd, 0x02 }, { 0x56ce, 0x01 }, { 0x56cf, 0x01 },
    	{ 0x56d0, 0x03 }, { 0x56d1, 0x08 }, { 0x56d2, 0x0c }, { 0x58c6, 0x00 },
    	{ 0x58c7, 0x12 }, { 0x58c8, 0x04 }, { 0x58c9, 0x02 }, { 0x58ca, 0x01 },
    	{ 0x58cb, 0x01 }, { 0x58cc, 0x04 }, { 0x58cd, 0x02 }, { 0x58ce, 0x01 },
    	{ 0x58cf, 0x01 }, { 0x58d0, 0x03 }, { 0x58d1, 0x08 }, { 0x58d2, 0x0c },
    	{ 0x5004, 0x1e }, { 0x610a, 0x07 }, { 0x610b, 0x80 }, { 0x610c, 0x05 },
    	{ 0x610d, 0x00 }, { 0x6102, 0x3f }, { 0x6120, 0x75 }, { 0x6121, 0x75 },
    	{ 0x6122, 0x75 }, { 0x6123, 0x75 }, { 0x6124, 0x75 }, { 0x6125, 0x75 },
    	{ 0x6126, 0x75 }, { 0x6127, 0x75 }, { 0x6128, 0x75 }, { 0x6129, 0x75 },
    	{ 0x612a, 0x75 }, { 0x612b, 0x75 }, { 0x612c, 0x75 }, { 0x612d, 0x75 },
    	{ 0x612e, 0x75 }, { 0x612f, 0x75 }, { 0x6130, 0x75 }, { 0x6131, 0x75 },
    	{ 0x6132, 0x75 }, { 0x6133, 0x75 }, { 0x6134, 0x75 }, { 0x6135, 0x75 },
    	{ 0x6136, 0x75 }, { 0x6137, 0x75 }, { 0x6138, 0x75 }, { 0x6139, 0x75 },
    	{ 0x613a, 0x75 }, { 0x613b, 0x75 }, { 0x613c, 0x75 }, { 0x613d, 0x75 },
    	{ 0x613e, 0x75 }, { 0x613f, 0x75 }, { 0x6140, 0x75 }, { 0x6141, 0x75 },
    	{ 0x6142, 0x75 }, { 0x6143, 0x75 }, { 0x6144, 0x75 }, { 0x6145, 0x75 },
    	{ 0x6146, 0x75 }, { 0x6147, 0x75 }, { 0x6148, 0x75 }, { 0x6149, 0x75 },
    	{ 0x614a, 0x75 }, { 0x614b, 0x75 }, { 0x614c, 0x75 }, { 0x614d, 0x75 },
    	{ 0x614e, 0x75 }, { 0x614f, 0x75 }, { 0x6150, 0x75 }, { 0x6151, 0x75 },
    	{ 0x6152, 0x75 }, { 0x6153, 0x75 }, { 0x6154, 0x75 }, { 0x6155, 0x75 },
    	{ 0x6156, 0x75 }, { 0x6157, 0x75 }, { 0x6158, 0x75 }, { 0x6159, 0x75 },
    	{ 0x615a, 0x75 }, { 0x615b, 0x75 }, { 0x615c, 0x75 }, { 0x615d, 0x75 },
    	{ 0x615e, 0x75 }, { 0x615f, 0x75 }, { 0x6160, 0x75 }, { 0x6161, 0x75 },
    	{ 0x6162, 0x75 }, { 0x6163, 0x75 }, { 0x6164, 0x75 }, { 0x6165, 0x75 },
    	{ 0x6166, 0x75 }, { 0x6167, 0x75 }, { 0x6168, 0x75 }, { 0x6169, 0x75 },
    	{ 0x616a, 0x75 }, { 0x616b, 0x75 }, { 0x616c, 0x75 }, { 0x616d, 0x75 },
    	{ 0x616e, 0x75 }, { 0x616f, 0x75 }, { 0x6170, 0x75 }, { 0x6171, 0x75 },
    	{ 0x6172, 0x75 }, { 0x6173, 0x75 }, { 0x6174, 0x75 }, { 0x6175, 0x75 },
    	{ 0x6176, 0x75 }, { 0x6177, 0x75 }, { 0x6178, 0x75 }, { 0x6179, 0x75 },
    	{ 0x617a, 0x75 }, { 0x617b, 0x75 }, { 0x617c, 0x75 }, { 0x617d, 0x75 },
    	{ 0x617e, 0x75 }, { 0x617f, 0x75 }, { 0x6180, 0x75 }, { 0x6181, 0x75 },
    	{ 0x6182, 0x75 }, { 0x6183, 0x75 }, { 0x6184, 0x75 }, { 0x6185, 0x75 },
    	{ 0x6186, 0x75 }, { 0x6187, 0x75 }, { 0x6188, 0x75 }, { 0x6189, 0x75 },
    	{ 0x618a, 0x75 }, { 0x618b, 0x75 }, { 0x618c, 0x75 }, { 0x618d, 0x75 },
    	{ 0x618e, 0x75 }, { 0x618f, 0x75 }, { 0x6190, 0x75 }, { 0x6191, 0x75 },
    	{ 0x6192, 0x75 }, { 0x6193, 0x75 }, { 0x6194, 0x75 }, { 0x6195, 0x75 },
    	{ 0x6196, 0x75 }, { 0x6197, 0x75 }, { 0x6198, 0x75 }, { 0x6199, 0x75 },
    	{ 0x619a, 0x75 }, { 0x619b, 0x75 }, { 0x619c, 0x75 }, { 0x619d, 0x75 },
    	{ 0x619e, 0x75 }, { 0x619f, 0x75 }, { 0x61a0, 0x75 }, { 0x61a1, 0x75 },
    	{ 0x61a2, 0x75 }, { 0x61a3, 0x75 }, { 0x61a4, 0x75 }, { 0x61a5, 0x75 },
    	{ 0x61a6, 0x75 }, { 0x61a7, 0x75 }, { 0x61a8, 0x75 }, { 0x61a9, 0x75 },
    	{ 0x61aa, 0x75 }, { 0x61ab, 0x75 }, { 0x61ac, 0x75 }, { 0x61ad, 0x75 },
    	{ 0x61ae, 0x75 }, { 0x61af, 0x75 }, { 0x5d62, 0x07 }, { 0x5d40, 0x02 },
    	{ 0x5d41, 0x01 }, { 0x5d63, 0x08 }, { 0x5d64, 0x01 }, { 0x5d65, 0xff },
    	{ 0x5d56, 0x00 }, { 0x5d57, 0x20 }, { 0x5d58, 0x00 }, { 0x5d59, 0x20 },
    	{ 0x5d5a, 0x00 }, { 0x5d5b, 0x0c }, { 0x5d5c, 0x02 }, { 0x5d5d, 0x40 },
    	{ 0x5d5e, 0x02 }, { 0x5d5f, 0x40 }, { 0x5d60, 0x03 }, { 0x5d61, 0x40 },
    	{ 0x5d4a, 0x02 }, { 0x5d4b, 0x40 }, { 0x5d4c, 0x02 }, { 0x5d4d, 0x40 },
    	{ 0x5d4e, 0x02 }, { 0x5d4f, 0x40 }, { 0x5d50, 0x18 }, { 0x5d51, 0x80 },
    	{ 0x5d52, 0x18 }, { 0x5d53, 0x80 }, { 0x5d54, 0x18 }, { 0x5d55, 0x80 },
    	{ 0x5d46, 0x20 }, { 0x5d47, 0x00 }, { 0x5d48, 0x22 }, { 0x5d49, 0x00 },
    	{ 0x5d42, 0x20 }, { 0x5d43, 0x00 }, { 0x5d44, 0x22 }, { 0x5d45, 0x00 },
    	{ 0x4221, 0x03 }, { 0x3501, 0x01 }, { 0x3502, 0x87 }, { 0x3541, 0x01 },
    	{ 0x3542, 0x87 }, { 0x35c1, 0x00 }, { 0x35c2, 0x00 }, { 0x420e, 0x66 },
    	{ 0x420f, 0x5d }, { 0x4210, 0xa8 }, { 0x4211, 0x55 }, { 0x507a, 0x5f },
    	{ 0x507b, 0x46 }, { 0x4f00, 0x00 }, { 0x4f01, 0x01 }, { 0x4f02, 0x80 },
    	{ 0x4f03, 0x2c }, { 0x4f04, 0xf8 }, { 0x5e00, 0x00 }, { 0x5e01, 0x00 },
    	{ 0x5e02, 0x09 }, { 0x5e03, 0x09 }, { 0x5e04, 0x0a }, { 0x5e05, 0x0a },
    	{ 0x5e06, 0x0a }, { 0x5e07, 0x0b }, { 0x5e08, 0x0b }, { 0x5e09, 0x0d },
    	{ 0x5e0a, 0x0d }, { 0x5e0b, 0x0d }, { 0x5e0c, 0x0e }, { 0x5e0d, 0x0e },
    	{ 0x5e0e, 0x0f }, { 0x5e0f, 0x0f }, { 0x5e10, 0x10 }, { 0x5e11, 0x10 },
    	{ 0x5e12, 0x11 }, { 0x5e13, 0x11 }, { 0x5e14, 0x12 }, { 0x5e15, 0x12 },
    	{ 0x5e16, 0x12 }, { 0x5e17, 0x12 }, { 0x5e18, 0x13 }, { 0x5e19, 0x13 },
    	{ 0x5e1a, 0x13 }, { 0x5e1b, 0x14 }, { 0x5e1c, 0x14 }, { 0x5e1d, 0x14 },
    	{ 0x5e1e, 0x15 }, { 0x5e1f, 0x15 }, { 0x5e20, 0x15 }, { 0x5e21, 0x16 },
    	{ 0x5e22, 0x00 }, { 0x5e23, 0x00 }, { 0x5e24, 0x00 }, { 0x5e25, 0x00 },
    	{ 0x5e26, 0x01 }, { 0x5e27, 0xff }, { 0x5e28, 0x00 }, { 0x5e29, 0x00 },
    	{ 0x5e2a, 0x80 }, { 0x5e2b, 0x00 }, { 0x5e2c, 0x00 }, { 0x5e2d, 0x40 },
    	{ 0x5e2e, 0x00 }, { 0x5e2f, 0x00 }, { 0x5e30, 0x40 }, { 0x5e31, 0x00 },
    	{ 0x5e32, 0x00 }, { 0x5e33, 0x40 }, { 0x5e34, 0x00 }, { 0x5e35, 0x00 },
    	{ 0x5e36, 0x40 }, { 0x5e37, 0x00 }, { 0x5e38, 0x00 }, { 0x5e39, 0x40 },
    	{ 0x5e3a, 0x00 }, { 0x5e3b, 0x00 }, { 0x5e3c, 0x40 }, { 0x5e3d, 0x00 },
    	{ 0x5e3e, 0x00 }, { 0x5e3f, 0x80 }, { 0x5e40, 0x00 }, { 0x5e41, 0x00 },
    	{ 0x5e42, 0x80 }, { 0x5e43, 0x00 }, { 0x5e44, 0x00 }, { 0x5e45, 0x80 },
    	{ 0x5e46, 0x00 }, { 0x5e47, 0x00 }, { 0x5e48, 0x80 }, { 0x5e49, 0x00 },
    	{ 0x5e4a, 0x00 }, { 0x5e4b, 0x80 }, { 0x5e4c, 0x00 }, { 0x5e4d, 0x00 },
    	{ 0x5e4e, 0x80 }, { 0x5e4f, 0x00 }, { 0x5e50, 0x00 }, { 0x5e51, 0x80 },
    	{ 0x5e52, 0x00 }, { 0x5e53, 0x00 }, { 0x5e54, 0x80 }, { 0x5e55, 0x00 },
    	{ 0x5e56, 0x00 }, { 0x5e57, 0x80 }, { 0x5e58, 0x00 }, { 0x5e59, 0x00 },
    	{ 0x5e5a, 0x80 }, { 0x5e5b, 0x00 }, { 0x5e5c, 0x00 }, { 0x5e5d, 0x80 },
    	{ 0x5e5e, 0x00 }, { 0x5e5f, 0x00 }, { 0x5e60, 0x80 }, { 0x5e61, 0x00 },
    	{ 0x5e62, 0x00 }, { 0x5e63, 0x80 }, { 0x5e64, 0x00 }, { 0x5e65, 0x00 },
    	{ 0x5e66, 0x80 }, { 0x5e67, 0x00 }, { 0x5e68, 0x00 }, { 0x5e69, 0x80 },
    	{ 0x5e6a, 0x00 }, { 0x5e6b, 0x00 }, { 0x5e6c, 0x80 }, { 0x5e6d, 0x00 },
    	{ 0x5e6e, 0x00 }, { 0x5e6f, 0x80 }, { 0x5e70, 0x00 }, { 0x5e71, 0x00 },
    	{ 0x5e72, 0x80 }, { 0x5e73, 0x00 }, { 0x5e74, 0x00 }, { 0x5e75, 0x80 },
    	{ 0x5e76, 0x00 }, { 0x5e77, 0x00 }, { 0x5e78, 0x80 }, { 0x5e79, 0x00 },
    	{ 0x5e7a, 0x00 }, { 0x5e7b, 0x80 }, { 0x5e7c, 0x00 }, { 0x5e7d, 0x00 },
    	{ 0x5e7e, 0x80 }, { 0x5e7f, 0x00 }, { 0x5e80, 0x00 }, { 0x5e81, 0x80 },
    	{ 0x5e82, 0x00 }, { 0x5e83, 0x00 }, { 0x5e84, 0x80 }, { 0x5b7e, 0x01 },
    	{ 0x5b7f, 0x02 }, { 0x5b78, 0x00 }, { 0x5b79, 0x62 }, { 0x5b7a, 0x00 },
    	{ 0x5b7b, 0xc4 }, { 0x5b7c, 0x01 }, { 0x5b7d, 0x76 }, { 0x5b40, 0x00 },
    	{ 0x5b41, 0xfb }, { 0x5b42, 0x00 }, { 0x5b43, 0x05 }, { 0x5b44, 0x00 },
    	{ 0x5b45, 0x00 }, { 0x5b46, 0x00 }, { 0x5b47, 0x01 }, { 0x5b48, 0x01 },
    	{ 0x5b49, 0x06 }, { 0x5b4a, 0x0f }, { 0x5b4b, 0xf9 }, { 0x5b4c, 0x0f },
    	{ 0x5b4d, 0xf5 }, { 0x5b4e, 0x00 }, { 0x5b4f, 0x0b }, { 0x5b50, 0x01 },
    	{ 0x5b51, 0x00 }, { 0x5b52, 0x01 }, { 0x5b53, 0x1f }, { 0x5b54, 0x0f },
    	{ 0x5b55, 0xed }, { 0x5b56, 0x0f }, { 0x5b57, 0xf4 }, { 0x5b58, 0x00 },
    	{ 0x5b59, 0x07 }, { 0x5b5a, 0x01 }, { 0x5b5b, 0x04 }, { 0x5b5c, 0x0f },
    	{ 0x5b5d, 0xf5 }, { 0x5b5e, 0x0f }, { 0x5b5f, 0xec }, { 0x5b60, 0x0f },
    	{ 0x5b61, 0xed }, { 0x5b62, 0x01 }, { 0x5b63, 0x27 }, { 0x5b64, 0x01 },
    	{ 0x5b65, 0x71 }, { 0x5b66, 0x0f }, { 0x5b67, 0xe6 }, { 0x5b68, 0x0f },
    	{ 0x5b69, 0xa9 }, { 0x5b6a, 0x0f }, { 0x5b6b, 0xfe }, { 0x5b6c, 0x01 },
    	{ 0x5b6d, 0x0a }, { 0x5b6e, 0x0f }, { 0x5b6f, 0xf8 }, { 0x5b70, 0x00 },
    	{ 0x5b71, 0x00 }, { 0x5b72, 0x00 }, { 0x5b73, 0x04 }, { 0x5b74, 0x00 },
    	{ 0x5b75, 0xfc }, { 0x500d, 0x03 },
    };
    
    struct ox02f10 {
    	struct device *dev;
    	struct clk *xclk;
    	struct gpio_desc *pwdn_gpio;
    	struct gpio_desc *reset_gpio;
    	struct regmap *regmap;
    	struct v4l2_subdev sd;
    	struct media_pad pad;
    	struct v4l2_mbus_framefmt fmt;
    	struct v4l2_ctrl_handler ctrls;
    	struct v4l2_ctrl *exposure;
    	struct v4l2_ctrl *analogue_gain;
    	struct v4l2_mbus_config_mipi_csi2 bus;
    	/* Serializes controls, active format and streaming operations. */
    	struct mutex mutex;
    	bool streaming;
    };
    
    static int ox02f10_write_u16(struct ox02f10 *sensor,
    			     unsigned int reg, u16 value)
    {
    	u8 data[] = { value >> 8, value & 0xff };
    
    	return regmap_bulk_write(sensor->regmap, reg, data, sizeof(data));
    }
    
    static int ox02f10_set_exposure(struct ox02f10 *sensor, u32 exposure)
    {
    	return ox02f10_write_u16(sensor, OX02F10_REG_EXPOSURE, exposure);
    }
    
    static int ox02f10_set_analogue_gain(struct ox02f10 *sensor,
    				     u32 gain)
    {
    	return regmap_write(sensor->regmap,
    			    OX02F10_REG_ANALOG_GAIN,
    			    gain);
    }
    
    static inline struct ox02f10 *to_ox02f10(struct v4l2_subdev *sd)
    {
    	return container_of(sd, struct ox02f10, sd);
    }
    
    static int ox02f10_set_ctrl(struct v4l2_ctrl *ctrl)
    {
    	struct ox02f10 *sensor = container_of(ctrl->handler,
    					    struct ox02f10, ctrls);
    	int ret;
    
    	/* Cache controls while powered off; replay them before stream-on. */
    	ret = pm_runtime_get_if_in_use(sensor->dev);
    	if (ret <= 0)
    		return ret;
    
    	switch (ctrl->id) {
    	case V4L2_CID_EXPOSURE:
    		ret = ox02f10_set_exposure(sensor, ctrl->val);
    		break;
    	case V4L2_CID_ANALOGUE_GAIN:
    		ret = ox02f10_set_analogue_gain(sensor, ctrl->val);
    		break;
    	default:
    		ret = -EINVAL;
    	}
    
    	pm_runtime_put(sensor->dev);
    	return ret;
    }
    
    static int ox02f10_power_on(struct ox02f10 *sensor)
    {
    	int ret = clk_prepare_enable(sensor->xclk);
    	dev_info(sensor->dev, "DEBUG: power_on entry\n");//Muni
    
    	if (ret){
    		dev_err(sensor->dev,
    			"DEBUG: xclk enable failed: %d\n", ret);
    		return ret;
    	}
    	dev_info(sensor->dev, "DEBUG: xclk enabled, rate=%lu\n",
    		 clk_get_rate(sensor->xclk));
    	/* GPIO descriptor values are logical: 1 asserts, 0 deasserts. */
    	usleep_range(1000, 2000);
    	if (sensor->pwdn_gpio)
    	gpiod_set_value_cansleep(sensor->pwdn_gpio, 0);
    	if (sensor->reset_gpio)
    	gpiod_set_value_cansleep(sensor->reset_gpio, 0);
    	/* Allow startup even on modules without a controllable reset pin. */
    	msleep(30);
    	dev_info(sensor->dev, "DEBUG: power_on complete\n");
    	return 0;
    }
    
    static void ox02f10_power_off(struct ox02f10 *sensor)
    {
    	if (sensor->reset_gpio)
    	gpiod_set_value_cansleep(sensor->reset_gpio, 1);
    	if (sensor->pwdn_gpio)
    	gpiod_set_value_cansleep(sensor->pwdn_gpio, 1);
    	clk_disable_unprepare(sensor->xclk);
    }
    
    static int ox02f10_identify(struct ox02f10 *sensor)
    {
    	u8 id_bytes[2];
    	u16 id;
    	int ret;
    
    	ret = regmap_bulk_read(sensor->regmap, OX02F10_REG_CHIP_ID,
    			       id_bytes, sizeof(id_bytes));
    	if (ret)
    		return dev_err_probe(sensor->dev, ret, "failed to read chip ID\n");
    	id = (id_bytes[0] << 8) | id_bytes[1];
    	if (id != OX02F10_CHIP_ID) {
    		dev_err(sensor->dev, "unexpected chip ID 0x%04x\n", id);
    		return -ENODEV;
    	}
    	dev_info(sensor->dev, "detected OX02F10, chip ID 0x%04x\n", id);
    	return 0;
    }
    
    static void ox02f10_fill_format(struct v4l2_mbus_framefmt *fmt)
    {
    	fmt->width = OX02F10_WIDTH;
    	fmt->height = OX02F10_HEIGHT;
    	fmt->code = OX02F10_MEDIA_BUS_CODE;
    	fmt->field = V4L2_FIELD_NONE;
    	fmt->colorspace = V4L2_COLORSPACE_RAW;
    	fmt->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
    	fmt->quantization = V4L2_QUANTIZATION_FULL_RANGE;
    	fmt->xfer_func = V4L2_XFER_FUNC_NONE;
    }
    
    static int ox02f10_init_cfg(struct v4l2_subdev *sd,
    			    struct v4l2_subdev_state *state)
    {
    	if (!state)
    		return -EINVAL;
    
    	ox02f10_fill_format(v4l2_subdev_get_try_format(sd, state, 0));
    	return 0;
    }
    
    static int ox02f10_open(struct v4l2_subdev *sd,
    			struct v4l2_subdev_fh *fh)
    {
    	return ox02f10_init_cfg(sd, fh->state);
    }
    
    static int ox02f10_enum_mbus_code(struct v4l2_subdev *sd,
    				  struct v4l2_subdev_state *state,
    				  struct v4l2_subdev_mbus_code_enum *code)
    {
    	if (code->pad || code->index || code->stream)
    		return -EINVAL;
    	code->code = OX02F10_MEDIA_BUS_CODE;
    	return 0;
    }
    
    static int ox02f10_enum_frame_size(struct v4l2_subdev *sd,
    				   struct v4l2_subdev_state *state,
    				   struct v4l2_subdev_frame_size_enum *fse)
    {
    	if (fse->pad || fse->index || fse->stream ||
    	    fse->code != OX02F10_MEDIA_BUS_CODE)
    		return -EINVAL;
    	fse->min_width = fse->max_width = OX02F10_WIDTH;
    	fse->min_height = fse->max_height = OX02F10_HEIGHT;
    	return 0;
    }
    
    static int ox02f10_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
    				  struct v4l2_mbus_frame_desc *fd)
    {
    	if (pad)
    		return -EINVAL;
    
    	memset(fd, 0, sizeof(*fd));
    	fd->type = V4L2_MBUS_FRAME_DESC_TYPE_CSI2;
    	fd->num_entries = 1;
    	fd->entry[0].stream = 0;
    	fd->entry[0].flags = V4L2_MBUS_FRAME_DESC_FL_LEN_MAX;
    	fd->entry[0].length = OX02F10_WIDTH * OX02F10_HEIGHT *
    			      OX02F10_BITS_PER_PIXEL / 8;
    	fd->entry[0].pixelcode = OX02F10_MEDIA_BUS_CODE;
    	fd->entry[0].bus.csi2.vc = 0;
    	fd->entry[0].bus.csi2.dt = 0x2b; /* RAW10 */
    
    	return 0;
    }
    
    static int ox02f10_set_fmt(struct v4l2_subdev *sd,
    			   struct v4l2_subdev_state *state,
    			   struct v4l2_subdev_format *fmt)
    {
    	struct ox02f10 *sensor = to_ox02f10(sd);
    	int ret = 0;
    
    	if (fmt->pad || fmt->stream ||
    	    (fmt->which != V4L2_SUBDEV_FORMAT_TRY &&
    	     fmt->which != V4L2_SUBDEV_FORMAT_ACTIVE) ||
    	    (fmt->which == V4L2_SUBDEV_FORMAT_TRY && !state))
    		return -EINVAL;
    
    	mutex_lock(&sensor->mutex);
    	if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE && sensor->streaming) {
    		ret = -EBUSY;
    		goto unlock;
    	}
    	ox02f10_fill_format(&fmt->format);
    	if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
    		*v4l2_subdev_get_try_format(sd, state, 0) = fmt->format;
    	else
    		sensor->fmt = fmt->format;
    unlock:
    	mutex_unlock(&sensor->mutex);
    	return ret;
    }
    
    static int ox02f10_get_fmt(struct v4l2_subdev *sd,
    			   struct v4l2_subdev_state *state,
    			   struct v4l2_subdev_format *fmt)
    {
    	struct ox02f10 *sensor = to_ox02f10(sd);
    
    	if (fmt->pad || fmt->stream ||
    	    (fmt->which != V4L2_SUBDEV_FORMAT_TRY &&
    	     fmt->which != V4L2_SUBDEV_FORMAT_ACTIVE) ||
    	    (fmt->which == V4L2_SUBDEV_FORMAT_TRY && !state))
    		return -EINVAL;
    
    	mutex_lock(&sensor->mutex);
    	if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
    		fmt->format = *v4l2_subdev_get_try_format(sd, state, 0);
    	else
    		fmt->format = sensor->fmt;
    	mutex_unlock(&sensor->mutex);
    	return 0;
    }
    
    static int ox02f10_get_selection(struct v4l2_subdev *sd,
    				 struct v4l2_subdev_state *state,
    				 struct v4l2_subdev_selection *sel)
    {
    	if (sel->pad || sel->stream ||
    	    (sel->which != V4L2_SUBDEV_FORMAT_TRY &&
    	     sel->which != V4L2_SUBDEV_FORMAT_ACTIVE))
    		return -EINVAL;
    
    	/* Only the fixed output window is described by the board mode. */
    	switch (sel->target) {
    	case V4L2_SEL_TGT_CROP:
    	case V4L2_SEL_TGT_CROP_DEFAULT:
    	case V4L2_SEL_TGT_CROP_BOUNDS:
    		sel->r = (struct v4l2_rect) {
    			.width = OX02F10_WIDTH,
    			.height = OX02F10_HEIGHT,
    		};
    		return 0;
    	default:
    		return -EINVAL;
    	}
    }
    
    static int ox02f10_get_frame_interval(struct v4l2_subdev *sd,
    				      struct v4l2_subdev_frame_interval *fi)
    {
    	if (fi->pad || fi->stream)
    		return -EINVAL;
    	fi->interval.numerator = 1;
    	fi->interval.denominator = OX02F10_FPS;
    	return 0;
    }
    
    static int ox02f10_enum_frame_interval(struct v4l2_subdev *sd,
    				      struct v4l2_subdev_state *state,
    				      struct v4l2_subdev_frame_interval_enum *fie)
    {
    	if (fie->pad || fie->stream || fie->index ||
    	    fie->code != OX02F10_MEDIA_BUS_CODE ||
    	    fie->width != OX02F10_WIDTH || fie->height != OX02F10_HEIGHT)
    		return -EINVAL;
    
    	fie->interval.numerator = 1;
    	fie->interval.denominator = OX02F10_FPS;
    	return 0;
    }
    
    static int ox02f10_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
    				   struct v4l2_mbus_config *config)
    {
    	struct ox02f10 *sensor = to_ox02f10(sd);
    
    	if (pad)
    		return -EINVAL;
    
    	config->type = V4L2_MBUS_CSI2_DPHY;
    	config->bus.mipi_csi2 = sensor->bus;
    	return 0;
    }
    
    static int ox02f10_start_streaming(struct ox02f10 *sensor)
    {
    	int ret;
    	 unsigned int val;//Muni
    dev_info(sensor->dev,
    		 "DEBUG: start_streaming entered\n");//Muni
    	ret = regmap_write(sensor->regmap, OX02F10_REG_SOFTWARE_RESET, 1);
    	if (ret){
    		dev_err(sensor->dev,
    			"DEBUG: software reset failed: %d\n", ret);//Muni
    		return ret;
    	}
    	dev_info(sensor->dev,
    		 "DEBUG: software reset OK\n");//Muni
    	usleep_range(5000, 10000);
    	dev_info(sensor->dev,
    		 "DEBUG: writing mode register table\n");//Muni
    	ret = regmap_multi_reg_write(sensor->regmap, ox02f10_1920x1080_regs,
    				     ARRAY_SIZE(ox02f10_1920x1080_regs));
    	if (ret) {
    		dev_err(sensor->dev, "failed to write mode registers: %d\n", ret);
    		return ret;
    	}
    	dev_info(sensor->dev,
    		 "DEBUG: mode register table OK\n");//Muni
    	/* sensor->mutex already protects the control handler. */
    	ret = __v4l2_ctrl_handler_setup(&sensor->ctrls);
    	if (ret){
    		dev_err(sensor->dev,
    			"DEBUG: control setup failed: %d\n", ret);//Muni
    		return ret;
    	}
    	dev_info(sensor->dev,
    		 "DEBUG: controls OK\n");//Muni
    	ret = regmap_write(sensor->regmap, OX02F10_REG_MODE_SELECT,
    			   OX02F10_MODE_STREAMING);
    	if (!ret) {
    		usleep_range(10000, 20000);
    		dev_info(sensor->dev,
    			 "DEBUG: MODE_SELECT=STREAMING OK\n");//Muni
    		/* Muni code start */
    		/* -------- Register readback starts here -------- */
    
    		if (!regmap_read(sensor->regmap, 0x0100, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 0100 = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x3808, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 3808 = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x3809, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 3809 = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380a, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380A = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380b, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380B = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380c, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380C = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380d, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380D = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380e, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380E = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380f, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380F = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x4800, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 4800 = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x4837, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 4837 = 0x%02x\n", val);
    
    		/* -------- Register readback ends here -------- */
    		//Muni code ends
    	}
    	return ret;
    }
    
    static int ox02f10_stop_streaming(struct ox02f10 *sensor)
    {
    	int ret = regmap_write(sensor->regmap, OX02F10_REG_MODE_SELECT,
    			       OX02F10_MODE_STANDBY);
    
    	if (!ret)
    		usleep_range(10000, 20000);
    	return ret;
    }
    
    static int ox02f10_set_stream(struct v4l2_subdev *sd, int enable)
    {
    	struct ox02f10 *sensor = to_ox02f10(sd);
    	int ret = 0;
    dev_info(sensor->dev,
    	 "DEBUG: set_stream enable=%d\n", enable);//Muni
    	enable = !!enable;
    	mutex_lock(&sensor->mutex);
    	if (sensor->streaming == enable)
    		goto unlock;
    	if (enable) {
    		ret = pm_runtime_resume_and_get(sensor->dev);
    		if (ret < 0)
    			goto unlock;
    		ret = ox02f10_start_streaming(sensor);
    		if (ret) {
    			/* Stream-on may have reached the sensor despite an I2C error. */
    			ox02f10_stop_streaming(sensor);
    			pm_runtime_put_sync(sensor->dev);
    			goto unlock;
    		}
    	} else {
    		ret = ox02f10_stop_streaming(sensor);
    		/* Release power even if the standby write failed. */
    		pm_runtime_put_sync(sensor->dev);
    		sensor->streaming = false;
    		goto unlock;
    	}
    	sensor->streaming = enable;
    unlock:
    	mutex_unlock(&sensor->mutex);
    	if (ret)
    		dev_err(sensor->dev, "failed to %s streaming: %d\n",
    			enable ? "start" : "stop", ret);
    	return ret;
    }
    
    static const struct v4l2_subdev_core_ops ox02f10_core_ops = {
    	.subscribe_event = v4l2_ctrl_subdev_subscribe_event,
    	.unsubscribe_event = v4l2_event_subdev_unsubscribe,
    };
    
    static const struct v4l2_subdev_video_ops ox02f10_video_ops = {
    	.g_frame_interval = ox02f10_get_frame_interval,
    	//.s_frame_interval = ox02f10_get_frame_interval,
    	.s_stream = ox02f10_set_stream,
    };
    
    static const struct v4l2_subdev_pad_ops ox02f10_pad_ops = {
    	.init_cfg = ox02f10_init_cfg,
    	.get_fmt = ox02f10_get_fmt,
    	.set_fmt = ox02f10_set_fmt,
    	.get_selection = ox02f10_get_selection,
    	.enum_mbus_code = ox02f10_enum_mbus_code,
    	.enum_frame_size = ox02f10_enum_frame_size,
    	.enum_frame_interval = ox02f10_enum_frame_interval,
    	.get_frame_desc = ox02f10_get_frame_desc,
    	.get_mbus_config = ox02f10_get_mbus_config,
    };
    
    static const struct v4l2_subdev_internal_ops ox02f10_internal_ops = {
    	.open = ox02f10_open,
    };
    
    static const struct v4l2_subdev_ops ox02f10_subdev_ops = {
    	.core = &ox02f10_core_ops,
    	.video = &ox02f10_video_ops,
    	.pad = &ox02f10_pad_ops,
    };
    
    static int ox02f10_runtime_resume(struct device *dev)
    {
    	dev_info(dev, "DEBUG: runtime_resume called\n");//Muni
    	return ox02f10_power_on(to_ox02f10(dev_get_drvdata(dev)));
    }
    
    static int ox02f10_runtime_suspend(struct device *dev)
    {
    	ox02f10_power_off(to_ox02f10(dev_get_drvdata(dev)));
    	return 0;
    }
    
    static int ox02f10_parse_endpoint(struct ox02f10 *sensor)
    {
    	struct v4l2_fwnode_endpoint ep = {
    		.bus_type = V4L2_MBUS_CSI2_DPHY,
    	};
    	struct fwnode_handle *endpoint;
    	unsigned int i;
    	int ret;
    
    	endpoint = fwnode_graph_get_next_endpoint(dev_fwnode(sensor->dev), NULL);
    	if (!endpoint)
    		return dev_err_probe(sensor->dev, -EINVAL,
    				     "missing CSI-2 endpoint\n");
    	ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &ep);
    	fwnode_handle_put(endpoint);
    	if (ret) {
    		dev_err_probe(sensor->dev, ret, "failed to parse CSI-2 endpoint\n");
    		goto free_ep;
    	}
    	if (ep.bus.mipi_csi2.num_data_lanes != OX02F10_NUM_DATA_LANES ||
    	    ep.bus.mipi_csi2.clock_lane != 0 ||
    	    ep.bus.mipi_csi2.flags & V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK) {
    		ret = dev_err_probe(sensor->dev, -EINVAL,
    				    "mode requires four lanes and continuous clock on lane 0\n");
    		goto free_ep;
    	}
    	for (i = 0; i < OX02F10_NUM_DATA_LANES; i++) {
    		if (ep.bus.mipi_csi2.data_lanes[i] != i + 1) {
    			ret = dev_err_probe(sensor->dev, -EINVAL,
    					    "mode requires data-lanes = <1 2 3 4>\n");
    			goto free_ep;
    		}
    	}
    	for (i = 0; i <= OX02F10_NUM_DATA_LANES; i++) {
    		if (ep.bus.mipi_csi2.lane_polarities[i]) {
    			ret = dev_err_probe(sensor->dev, -EINVAL,
    					    "lane polarity inversion is not supported\n");
    			goto free_ep;
    		}
    	}
    	for (i = 0; i < ep.nr_of_link_frequencies; i++)
    		if (ep.link_frequencies[i] == OX02F10_LINK_FREQ)
    			break;
    	if (i == ep.nr_of_link_frequencies) {
    		ret = dev_err_probe(sensor->dev, -EINVAL,
    				    "endpoint must support a %lld Hz link frequency\n",
    				    OX02F10_LINK_FREQ);
    		goto free_ep;
    	}
    	sensor->bus = ep.bus.mipi_csi2;
    	ret = 0;
    free_ep:
    	v4l2_fwnode_endpoint_free(&ep);
    	return ret;
    }
    
    static const struct v4l2_ctrl_ops ox02f10_ctrl_ops = {
    	.s_ctrl = ox02f10_set_ctrl,
    };
    
    static int ox02f10_init_controls(struct ox02f10 *sensor)
    {
    	struct v4l2_ctrl *ctrl;
    	s64 pixel_rate;
    	int ret;
    
    	ret = v4l2_ctrl_handler_init(&sensor->ctrls, 4);
    	if (ret)
    		return ret;
    	sensor->ctrls.lock = &sensor->mutex;
    	ctrl = v4l2_ctrl_new_int_menu(&sensor->ctrls, NULL,
    				      V4L2_CID_LINK_FREQ, 0, 0,
    				      ox02f10_link_freq_menu);
    	if (ctrl)
    		ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
    	pixel_rate = OX02F10_LINK_FREQ * 2 * OX02F10_NUM_DATA_LANES /
    		     OX02F10_BITS_PER_PIXEL;
    	ctrl = v4l2_ctrl_new_std(&sensor->ctrls, NULL, V4L2_CID_PIXEL_RATE,
    				 pixel_rate, pixel_rate, 1, pixel_rate);
    	if (ctrl)
    		ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
    
    	sensor->exposure = v4l2_ctrl_new_std(&sensor->ctrls, &ox02f10_ctrl_ops,
    					    V4L2_CID_EXPOSURE, OX02F10_EXPOSURE_MIN,
    					    OX02F10_VTS_DEFAULT - OX02F10_EXPOSURE_MARGIN,
    					    1, OX02F10_EXPOSURE_DEFAULT);
    	sensor->analogue_gain = v4l2_ctrl_new_std(&sensor->ctrls, &ox02f10_ctrl_ops,
    						 V4L2_CID_ANALOGUE_GAIN,
    						 OX02F10_ANALOG_GAIN_MIN,
    						 OX02F10_ANALOG_GAIN_MAX, 1,
    						 OX02F10_ANALOG_GAIN_DEFAULT);
    	/*
    	 * The table's VTS is smaller than the output height. Its timing units
    	 * need vendor confirmation before exposing HBLANK/VBLANK controls.
    	 * Keep the existing fixed-mode exposure limits in register units.
    	 */
    	if (sensor->ctrls.error) {
    		ret = sensor->ctrls.error;
    		v4l2_ctrl_handler_free(&sensor->ctrls);
    		return ret;
    	}
    	sensor->sd.ctrl_handler = &sensor->ctrls;
    	return 0;
    }
    
    static int ox02f10_probe(struct i2c_client *client)
    {
    	struct device *dev = &client->dev;
    	struct ox02f10 *sensor;
    	int ret;
    
    	sensor = devm_kzalloc(dev, sizeof(*sensor), GFP_KERNEL);
    	if (!sensor)
    		return -ENOMEM;
    	sensor->dev = dev;
    	mutex_init(&sensor->mutex);
    	sensor->regmap = devm_regmap_init_i2c(client, &ox02f10_regmap_config);
    	if (IS_ERR(sensor->regmap)) {
    		ret = PTR_ERR(sensor->regmap);
    		goto destroy_mutex;
    	}
    	sensor->xclk = devm_clk_get(dev, "inck");
    	if (IS_ERR(sensor->xclk)) {
    		ret = dev_err_probe(dev, PTR_ERR(sensor->xclk),
    				    "failed to get input clock\n");
    		goto destroy_mutex;
    	}
    	if (clk_get_rate(sensor->xclk) != OX02F10_XCLK_FREQ) {
    		dev_err(dev, "input clock must be %u Hz\n", OX02F10_XCLK_FREQ);
    		ret = -EINVAL;
    		goto destroy_mutex;
    	}
    	sensor->pwdn_gpio =
    		devm_gpiod_get_optional(dev, "pwdn", GPIOD_OUT_HIGH);
    	if (IS_ERR(sensor->pwdn_gpio)) {
    		ret = dev_err_probe(dev, PTR_ERR(sensor->pwdn_gpio),
    				    "failed to get power-down GPIO\n");
    		goto destroy_mutex;
    	}
    	sensor->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
    	if (IS_ERR(sensor->reset_gpio)) {
    		ret = dev_err_probe(dev, PTR_ERR(sensor->reset_gpio),
    				    "failed to get reset GPIO\n");
    		goto destroy_mutex;
    	}
    	ret = ox02f10_parse_endpoint(sensor);
    	if (ret)
    		goto destroy_mutex;
    	v4l2_i2c_subdev_init(&sensor->sd, client, &ox02f10_subdev_ops);
    	sensor->sd.internal_ops = &ox02f10_internal_ops;
    	ox02f10_fill_format(&sensor->fmt);
    	sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
    			    V4L2_SUBDEV_FL_HAS_EVENTS;
    	sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
    	sensor->pad.flags = MEDIA_PAD_FL_SOURCE;
    	ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
    	if (ret)
    		goto destroy_mutex;
    	ret = ox02f10_init_controls(sensor);
    	if (ret)
    		goto cleanup_entity;
    	ret = ox02f10_power_on(sensor);
    	if (ret)
    		goto free_ctrls;
    	ret = ox02f10_identify(sensor);
    	ox02f10_power_off(sensor);
    	if (ret)
    		goto free_ctrls;
    	pm_runtime_set_suspended(dev);
    	pm_runtime_enable(dev);
    	ret = v4l2_async_register_subdev_sensor(&sensor->sd);
    	if (ret)
    		goto disable_pm;
    	return 0;
    
    disable_pm:
    	pm_runtime_disable(dev);
    free_ctrls:
    	v4l2_ctrl_handler_free(&sensor->ctrls);
    cleanup_entity:
    	media_entity_cleanup(&sensor->sd.entity);
    destroy_mutex:
    	mutex_destroy(&sensor->mutex);
    	return ret;
    }
    
    static void ox02f10_remove(struct i2c_client *client)
    {
    	struct v4l2_subdev *sd = i2c_get_clientdata(client);
    	struct ox02f10 *sensor = to_ox02f10(sd);
    
    	v4l2_async_unregister_subdev(sd);
    	if (sensor->streaming)
    		ox02f10_set_stream(sd, 0);
    	v4l2_ctrl_handler_free(&sensor->ctrls);
    	media_entity_cleanup(&sd->entity);
    	pm_runtime_disable(sensor->dev);
    	if (!pm_runtime_status_suspended(sensor->dev))
    		ox02f10_power_off(sensor);
    	pm_runtime_set_suspended(sensor->dev);
    	mutex_destroy(&sensor->mutex);
    }
    
    static const struct dev_pm_ops ox02f10_pm_ops = {
    	SET_RUNTIME_PM_OPS(ox02f10_runtime_suspend,
    			   ox02f10_runtime_resume, NULL)
    };
    
    static const struct of_device_id ox02f10_of_match[] = {
    	{ .compatible = "ovti,ox02f10" },
    	{ }
    };
    MODULE_DEVICE_TABLE(of, ox02f10_of_match);
    
    static struct i2c_driver ox02f10_i2c_driver = {
    	.driver = {
    		.name = "ox02f10",
    		.of_match_table = ox02f10_of_match,
    		.pm = &ox02f10_pm_ops,
    	},
    	.probe_new = ox02f10_probe,
    	.remove = ox02f10_remove,
    };
    module_i2c_driver(ox02f10_i2c_driver);
    
    MODULE_DESCRIPTION("OmniVision OX02F10 image sensor driver");
    MODULE_LICENSE("GPL");
    

    Log:


    U-Boot SPL 2023.04-dirty (Sep 24 2026 - 13:55:29 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
    am62a_init: board_init_f done
    SPL initial stack usage: 17064 bytes
    am62a_init: spl_boot_device: devstat = 0x1643 bootmedia = 0x8 bootindex = 0
    Trying to boot from MMC2
    am62a_init: spl_boot_device: devstat = 0x1643 bootmedia = 0x8 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x1643 bootmedia = 0x8 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x1643 bootmedia = 0x8 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x1643 bootmedia = 0x8 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x1643 bootmedia = 0x8 bootindex = 0
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE: BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE: BL31: Built : 16:09:05, Feb 9 2024
    
    U-Boot SPL 2023.04-dirty (Sep 25 2026 - 10:59:39 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
    am62a_init: board_init_f done
    am62a_init: spl_boot_device: devstat = 0x1643 bootmedia = 0x8 bootindex = 0
    Trying to boot from MMC2
    am62a_init: spl_boot_device: devstat = 0x1643 bootmedia = 0x8 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x1643 bootmedia = 0x8 bootindex = 0
    Authentication passed
    
    
    U-Boot 2023.04-dirty (Sep 25 2026 - 10:59:39 +0530)
    
    SoC: AM62AX SR1.0 HS-FS
    Model: FCM60E AM62A7 Custom Board
    DRAM: 2 GiB
    Core: 58 devices, 28 uclasses, devicetree: separate
    MMC: mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    MUNI: reset GPIO flags = 0x1a
    RTL9010: reset GPIO acquired, assert=20000 us post=100000 us
    Net: MUNI: forcing MDIO manual mode = 1
    MUNI: MDIO manual mode = 1
    MUNI: mdio_init has_phy=1 bus=0000000000000000
    MUNI: entered am65_cpsw_mdio_init()
    MUNI: RTL9010 RESET raw assert LOW
    MUNI: assert ret=0 raw=0
    MUNI: RTL9010 RESET raw deassert HIGH
    MUNI: deassert ret=0 raw=0
    MUNI: raw after post-delay=0
    MUNI: reset logical after mdio_setup=1
    MUNI: reset RAW after mdio_setup=0
    Could not get PHY for ethernet@8000000port@1: addr 1
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_connect() failed
    No ethernet found.
    
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    Failed to load 'boot.scr'
    965 bytes read in 23 ms (40 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    39072256 bytes read in 1655 ms (22.5 MiB/s)
    57136 bytes read in 28 ms (1.9 MiB/s)
    Working FDT set to 88000000
    1612 bytes read in 25 ms (62.5 KiB/s)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Working FDT set to 88000000
    Loading Device Tree to 000000008feef000, end 000000008fffffff ... OK
    Working FDT set to 8feef000
    
    Starting kernel ...
    
    [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [ 0.000000] Linux version 6.1.80-dirty (adculinux5@muni) (aarch64-oe-linux-gcc (GCC) 11.4.0, GNU ld (GNU Binutils) 2.38.20220708) #11 SMP PREEMPT Wed Sep 23 18:10:40 IST 2026
    [ 0.000000] Machine model: FCM60E AM62A7 Custom Board
    [ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [ 0.000000] printk: bootconsole [ns16550a0] enabled
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] Reserved memory: created CMA memory pool at 0x00000000c0000000, size 576 MiB
    [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x0000000099800000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node c7x-dma-memory@99800000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x0000000099900000, size 30 MiB
    [ 0.000000] OF: reserved mem: initialized node c7x-memory@99900000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b800000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9b800000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b900000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9b900000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c800000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9c800000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c900000, size 30 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9c900000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009e700000, size 0 MiB
    [ 0.000000] OF: reserved mem: initialized node p2c-shm@9e700000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 32 MiB
    [ 0.000000] OF: reserved mem: initialized node edgeai-dma-memory@a1000000, compatible id shared-dma-pool
    [ 0.000000] OF: reserved mem: initialized node edgeai_shared-memories, compatible id dma-heap-carveout
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000ae000000, size 288 MiB
    [ 0.000000] OF: reserved mem: initialized node edgeai-core-heap-memory@ae000000, compatible id shared-dma-pool
    [ 0.000000] NUMA: No NUMA configuration found
    [ 0.000000] NUMA: Faking a node at [mem 0x0000000080000000-0x00000000ffffffff]
    [ 0.000000] NUMA: NODE_DATA [mem 0xffc95a00-0xffc97fff]
    [ 0.000000] Zone ranges:
    [ 0.000000] DMA [mem 0x0000000080000000-0x00000000ffffffff]
    [ 0.000000] DMA32 empty
    [ 0.000000] Normal empty
    [ 0.000000] Movable zone start for each node
    [ 0.000000] Early memory node ranges
    [ 0.000000] node 0: [mem 0x0000000080000000-0x00000000997fffff]
    [ 0.000000] node 0: [mem 0x0000000099800000-0x000000009b7fefff]
    [ 0.000000] node 0: [mem 0x000000009b800000-0x000000009e707fff]
    [ 0.000000] node 0: [mem 0x000000009e708000-0x000000009e77ffff]
    [ 0.000000] node 0: [mem 0x000000009e780000-0x00000000a2ffffff]
    [ 0.000000] node 0: [mem 0x00000000a3000000-0x00000000adffffff]
    [ 0.000000] node 0: [mem 0x00000000ae000000-0x00000000bfffffff]
    [ 0.000000] node 0: [mem 0x00000000c0000000-0x00000000ffffffff]
    [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff]
    [ 0.000000] On node 0, zone DMA: 1 pages in unavailable ranges
    [ 0.000000] psci: probing for conduit method from DT.
    [ 0.000000] psci: PSCIv1.1 detected in firmware.
    [ 0.000000] psci: Using standard PSCI v0.2 function IDs
    [ 0.000000] psci: Trusted OS migration not required
    [ 0.000000] psci: SMC Calling Convention v1.4
    [ 0.000000] percpu: Embedded 21 pages/cpu s48040 r8192 d29784 u86016
    [ 0.000000] Detected VIPT I-cache on CPU0
    [ 0.000000] CPU features: detected: GIC system register CPU interface
    [ 0.000000] CPU features: detected: ARM erratum 845719
    [ 0.000000] alternatives: applying boot alternatives
    [ 0.000000] Fallback order for Node 0: 0
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516095
    [ 0.000000] Policy zone: DMA
    [ 0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 mtdparts=spi-nand0:512k(ospi_nand.tiboot3),2m(ospi_nand.tispl),4m(ospi_nand.u-boot),256k(ospi_nand.env),256k(ospi_nand.env.backup),98048k@32m(ospi_nand.rootfs),256k@130816k(ospi_nand.phypattern) root=PARTUUID=2f7e9462-02 rw rootfstype=ext4 rootwait
    [ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
    [ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
    [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [ 0.000000] Memory: 798444K/2097148K available (17024K kernel code, 3788K rwdata, 9544K rodata, 7680K init, 625K bss, 708880K reserved, 589824K cma-reserved)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [ 0.000000] rcu: Preemptible hierarchical RCU implementation.
    [ 0.000000] rcu: RCU event tracing is enabled.
    [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
    [ 0.000000] Trampoline variant of Tasks RCU enabled.
    [ 0.000000] Tracing variant of Tasks RCU enabled.
    [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
    [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    [ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode
    [ 0.000000] GICv3: 256 SPIs implemented
    [ 0.000000] GICv3: 0 Extended SPIs implemented
    [ 0.000000] Root IRQ handler: gic_handle_irq
    [ 0.000000] GICv3: GICv3 features: 16 PPIs
    [ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001880000
    [ 0.000000] ITS [mem 0x01820000-0x0182ffff]
    [ 0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
    [ 0.000000] ITS@0x0000000001820000: Devices Table too large, reduce ids 20->19
    [ 0.000000] ITS@0x0000000001820000: allocated 524288 Devices @80800000 (flat, esz 8, psz 64K, shr 0)
    [ 0.000000] ITS: using cache flushing for cmd queue
    [ 0.000000] GICv3: using LPI property table @0x0000000080040000
    [ 0.000000] GIC: using cache flushing for LPI property table
    [ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000080050000
    [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
    [ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [ 0.000000] clocksource: arch_sys_counter: mask: 0x3ffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
    [ 0.000001] sched_clock: 58 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [ 0.009808] Console: colour dummy device 80x25
    [ 0.014465] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
    [ 0.025151] pid_max: default: 32768 minimum: 301
    [ 0.029933] LSM: Security Framework initializing
    [ 0.034792] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [ 0.042373] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [ 0.052423] cblist_init_generic: Setting adjustable number of callback queues.
    [ 0.059880] cblist_init_generic: Setting shift to 2 and lim to 1.
    [ 0.066181] cblist_init_generic: Setting adjustable number of callback queues.
    [ 0.073579] cblist_init_generic: Setting shift to 2 and lim to 1.
    [ 0.080001] rcu: Hierarchical SRCU implementation.
    [ 0.084911] rcu: Max phase no-delay instances is 1000.
    [ 0.090519] Platform MSI: msi-controller@1820000 domain created
    [ 0.096877] PCI/MSI: /bus@f0000/interrupt-controller@1800000/msi-controller@1820000 domain created
    [ 0.106162] fsl-mc MSI: msi-controller@1820000 domain created
    [ 0.114257] EFI services will not be available.
    [ 0.119246] smp: Bringing up secondary CPUs ...
    [ 0.124624] Detected VIPT I-cache on CPU1
    [ 0.124756] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000
    [ 0.124778] GICv3: CPU1: using allocated LPI pending table @0x0000000080060000
    [ 0.124848] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
    [ 0.125636] Detected VIPT I-cache on CPU2
    [ 0.125727] GICv3: CPU2: found redistributor 2 region 0:0x00000000018c0000
    [ 0.125743] GICv3: CPU2: using allocated LPI pending table @0x0000000080070000
    [ 0.125782] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
    [ 0.126465] Detected VIPT I-cache on CPU3
    [ 0.126554] GICv3: CPU3: found redistributor 3 region 0:0x00000000018e0000
    [ 0.126568] GICv3: CPU3: using allocated LPI pending table @0x0000000080080000
    [ 0.126606] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
    [ 0.126678] smp: Brought up 1 node, 4 CPUs
    [ 0.206436] SMP: Total of 4 processors activated.
    [ 0.211251] CPU features: detected: 32-bit EL0 Support
    [ 0.216525] CPU features: detected: 32-bit EL1 Support
    [ 0.221787] CPU features: detected: CRC32 instructions
    [ 0.227123] CPU: All CPU(s) started at EL2
    [ 0.231340] alternatives: applying system-wide alternatives
    [ 0.239591] devtmpfs: initialized
    [ 0.252442] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [ 0.262467] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
    [ 0.294779] pinctrl core: initialized pinctrl subsystem
    [ 0.302646] DMI not present or invalid.
    [ 0.307407] NET: Registered PF_NETLINK/PF_ROUTE protocol family
    [ 0.314799] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
    [ 0.322332] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
    [ 0.330403] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
    [ 0.338602] audit: initializing netlink subsys (disabled)
    [ 0.344320] audit: type=2000 audit(0.224:1): state=initialized audit_enabled=0 res=1
    [ 0.345869] thermal_sys: Registered thermal governor 'step_wise'
    [ 0.352268] thermal_sys: Registered thermal governor 'power_allocator'
    [ 0.358502] cpuidle: using governor menu
    [ 0.369473] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
    [ 0.376527] ASID allocator initialised with 65536 entries
    [ 0.383966] Serial: AMBA PL011 UART driver
    [ 0.407193] platform a40000.pinctrl: Fixed dependency cycle(s) with /bus@f0000/pinctrl@a40000/cpsw-cpts
    [ 0.423643] KASLR disabled due to lack of seed
    [ 0.436877] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
    [ 0.443863] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
    [ 0.450322] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
    [ 0.457262] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
    [ 0.463671] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
    [ 0.470611] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
    [ 0.477019] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
    [ 0.483958] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
    [ 0.492520] ACPI: Interpreter disabled.
    [ 0.498739] k3-chipinfo 43000014.chipid: Family:AM62AX rev:SR1.0 JTAGID[0x0bb8d02f] Detected
    [ 0.509524] iommu: Default domain type: Translated
    [ 0.514561] iommu: DMA domain TLB invalidation policy: strict mode
    [ 0.521310] SCSI subsystem initialized
    [ 0.525563] usbcore: registered new interface driver usbfs
    [ 0.531219] usbcore: registered new interface driver hub
    [ 0.536677] usbcore: registered new device driver usb
    [ 0.543274] pps_core: LinuxPPS API ver. 1 registered
    [ 0.548362] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.557719] PTP clock support registered
    [ 0.561877] EDAC MC: Ver: 3.0.0
    [ 0.567082] omap-mailbox 29000000.mailbox: omap mailbox rev 0x66fca100
    [ 0.573984] omap-mailbox 29010000.mailbox: omap mailbox rev 0x66fca100
    [ 0.580802] omap-mailbox 29020000.mailbox: omap mailbox rev 0x66fca100
    [ 0.587535] omap-mailbox 29030000.mailbox: no available mbox devices found
    [ 0.595484] FPGA manager framework
    [ 0.599116] Advanced Linux Sound Architecture Driver Initialized.
    [ 0.606440] vgaarb: loaded
    [ 0.609797] clocksource: Switched to clocksource arch_sys_counter
    [ 0.616341] VFS: Disk quotas dquot_6.6.0
    [ 0.620404] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [ 0.627650] pnp: PnP ACPI: disabled
    [ 0.637332] Carveout Heap: Exported 176 MiB at 0x00000000a3000000
    [ 0.643732] NET: Registered PF_INET protocol family
    [ 0.648963] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
    [ 0.658357] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
    [ 0.667177] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [ 0.675119] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
    [ 0.683328] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
    [ 0.691399] TCP: Hash tables configured (established 16384 bind 16384)
    [ 0.698335] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [ 0.705269] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [ 0.712829] NET: Registered PF_UNIX/PF_LOCAL protocol family
    [ 0.719189] RPC: Registered named UNIX socket transport module.
    [ 0.725274] RPC: Registered udp transport module.
    [ 0.730097] RPC: Registered tcp transport module.
    [ 0.734906] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.741500] NET: Registered PF_XDP protocol family
    [ 0.746416] PCI: CLS 0 bytes, default 64
    [ 0.751451] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
    [ 0.760642] kvm [1]: IPA Size Limit: 40 bits
    [ 0.766721] kvm [1]: vgic-v2@100010000
    [ 0.770578] kvm [1]: GIC system register CPU interface enabled
    [ 0.776662] kvm [1]: vgic interrupt IRQ9
    [ 0.780761] kvm [1]: Hyp mode initialized successfully
    [ 0.787717] Initialise system trusted keyrings
    [ 0.792635] workingset: timestamp_bits=42 max_order=19 bucket_order=0
    [ 0.805746] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.812459] NFS: Registering the id_resolver key type
    [ 0.817695] Key type id_resolver registered
    [ 0.821974] Key type id_legacy registered
    [ 0.826142] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [ 0.832998] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
    [ 0.840800] 9p: Installing v9fs 9p2000 file system support
    [ 0.881339] Key type asymmetric registered
    [ 0.885534] Asymmetric key parser 'x509' registered
    [ 0.890581] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
    [ 0.898327] io scheduler mq-deadline registered
    [ 0.902970] io scheduler kyber registered
    [ 0.917619] pinctrl-single 4084000.pinctrl: 34 pins, size 136
    [ 0.924297] pinctrl-single f4000.pinctrl: 151 pins, size 604
    [ 0.931778] pinctrl-single a40000.pinctrl: 512 pins, size 2048
    [ 0.947547] EINJ: ACPI disabled.
    [ 0.979323] Serial: 8250/16550 driver, 12 ports, IRQ sharing enabled
    [ 0.991637] SuperH (H)SCI(F) driver initialized
    [ 0.997079] msm_serial: driver initialized
    [ 1.010163] loop: module loaded
    [ 1.015942] megasas: 07.719.03.00-rc1
    [ 1.028226] tun: Universal TUN/TAP device driver, 1.6
    [ 1.034993] thunder_xcv, ver 1.0
    [ 1.038367] thunder_bgx, ver 1.0
    [ 1.041708] nicpf, ver 1.0
    [ 1.046659] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
    [ 1.054082] hns3: Copyright (c) 2017 Huawei Corporation.
    [ 1.059587] hclge is initializing
    [ 1.063007] e1000: Intel(R) PRO/1000 Network Driver
    [ 1.067995] e1000: Copyright (c) 1999-2006 Intel Corporation.
    [ 1.073933] e1000e: Intel(R) PRO/1000 Network Driver
    [ 1.079014] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
    [ 1.085099] igb: Intel(R) Gigabit Ethernet Network Driver
    [ 1.090621] igb: Copyright (c) 2007-2014 Intel Corporation.
    [ 1.096350] igbvf: Intel(R) Gigabit Virtual Function Network Driver
    [ 1.102760] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
    [ 1.109367] sky2: driver version 1.30
    [ 1.114989] VFIO - User Level meta-driver version: 0.3
    [ 1.123442] usbcore: registered new interface driver usb-storage
    [ 1.133519] i2c_dev: i2c /dev entries driver
    [ 1.150327] sdhci: Secure Digital Host Controller Interface driver
    [ 1.156696] sdhci: Copyright(c) Pierre Ossman
    [ 1.162426] Synopsys Designware Multimedia Card Interface Driver
    [ 1.170054] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 1.178789] ledtrig-cpu: registered to indicate activity on CPUs
    [ 1.187498] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
    [ 1.195081] usbcore: registered new interface driver usbhid
    [ 1.200811] usbhid: USB HID core driver
    [ 1.211613] optee: probing for conduit method.
    [ 1.216239] optee: revision 4.1 (012cdca4)
    [ 1.216720] optee: dynamic shared memory is enabled
    [ 1.226345] optee: initialized driver
    [ 1.235110] Initializing XFRM netlink socket
    [ 1.239570] NET: Registered PF_PACKET protocol family
    [ 1.244927] 9pnet: Installing 9P2000 support
    [ 1.249410] Key type dns_resolver registered
    [ 1.254358] registered taskstats version 1
    [ 1.258593] Loading compiled-in X.509 certificates
    [ 1.302992] ti-sci 44043000.system-controller: ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
    [ 1.382778] i2c 0-0048: Fixed dependency cycle(s) with /bus@f0000/i2c@20000000/pmic@48/regulators/buck5
    [ 1.392660] omap_i2c 20000000.i2c: bus 0 rev0.12 at 400 kHz
    [ 1.400279] omap_i2c 20020000.i2c: bus 1 rev0.12 at 100 kHz
    [ 1.407910] omap_i2c 20030000.i2c: bus 2 rev0.12 at 400 kHz
    [ 1.414711] ti-sci-intr 4210000.interrupt-controller: Interrupt Router 5 domain created
    [ 1.423520] ti-sci-intr bus@f0000:interrupt-controller@a00000: Interrupt Router 3 domain created
    [ 1.433095] ti-sci-inta 48000000.interrupt-controller: Interrupt Aggregator domain 28 created
    [ 1.442475] ti-sci-inta 4e0a0000.interrupt-controller: Interrupt Aggregator domain 200 created
    [ 1.458967] ti-udma 485c0100.dma-controller: Number of rings: 82
    [ 1.467406] ti-udma 485c0100.dma-controller: Channels: 48 (bchan: 18, tchan: 12, rchan: 18)
    [ 1.480112] ti-udma 485c0000.dma-controller: Number of rings: 150
    [ 1.490370] ti-udma 485c0000.dma-controller: Channels: 35 (tchan: 20, rchan: 15)
    [ 1.501559] ti-udma 4e230000.dma-controller: Number of rings: 6
    [ 1.508246] ti-udma 4e230000.dma-controller: Channels: 6 (bchan: 0, tchan: 0, rchan: 6)
    [ 1.519812] printk: console [ttyS2] disabled
    [ 1.524285] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 253, base_baud = 3000000) is a 8250
    [ 1.533183] printk: console [ttyS2] enabled
    [ 1.533183] printk: console [ttyS2] enabled
    [ 1.541643] printk: bootconsole [ns16550a0] disabled
    [ 1.541643] printk: bootconsole [ns16550a0] disabled
    [ 1.556424] spi-nand spi0.0: unknown raw ID efdf2300
    [ 1.561442] spi-nand: probe of spi0.0 failed with error -524
    [ 1.609878] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [ 1.713838] davinci_mdio 8000f00.mdio: timed out waiting for user access
    [ 1.820790] davinci_mdio 8000f00.mdio: timed out waiting for idle
    [ 1.826882] davinci_mdio: probe of 8000f00.mdio failed with error -5
    [ 1.834037] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA01103, cpsw version 0x6BA81103 Ports: 3 quirks:00000006
    [ 1.846990] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.5
    [ 1.854124] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
    [ 1.860765] pps pps0: new PPS source ptp0
    [ 1.865083] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:1
    [ 1.875595] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
    [ 1.885902] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 1200000 KHz, changing to: 1250000 KHz
    [ 1.903731] gpio-2020 (PHY1_RESET_N_FORCE_HIGH): hogged as output/high
    [ 1.913527] gpio-1910 (tcan1057-stb): hogged as output/low
    [ 1.919080] gpio-1887 (PWR_CAM1V1_EN_SoC): hogged as output/high
    [ 1.925089] gpio-1890 (PWR_CAM1V8_EN_SoC): hogged as output/high
    [ 1.931096] gpio-1891 (PWR_CAM2V9_EN_SoC): hogged as output/high
    [ 1.937101] gpio-1889 (VPP_EN): hogged as output/high
    [ 2.287107] mmc1: CQHCI version 5.10
    [ 2.332472] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit
    [ 2.347069] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [ 2.355818] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [ 2.363190] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [ 2.378709] ALSA device list:
    [ 2.381702] No soundcards found.
    [ 2.386365] Waiting for root device PARTUUID=2f7e9462-02...
    [ 2.401972] mmc1: new high speed SDHC card at address aaaa
    [ 2.408927] mmcblk1: mmc1:aaaa SK32G 29.7 GiB
    [ 2.416377] mmcblk1: p1 p2
    [ 7.076300] EXT4-fs (mmcblk1p2): recovery complete
    [ 7.083229] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Quota mode: none.
    [ 7.091918] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [ 7.112357] devtmpfs: mounted
    [ 7.119971] Freeing unused kernel memory: 7680K
    [ 7.124932] Run /sbin/init as init process
    [ 7.891848] systemd[1]: System time before build time, advancing clock.
    [ 8.441294] NET: Registered PF_INET6 protocol family
    [ 8.448750] Segment Routing with IPv6
    [ 8.452533] In-situ OAM (IOAM) with IPv6
    [ 8.521875] systemd[1]: systemd 250.5+ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid)
    [ 8.554694] systemd[1]: Detected architecture arm64.
    
    Welcome to Arago 2023.10!
    
    [ 8.624122] systemd[1]: Hostname set to <am62axx-evm>.
    [ 8.827058] systemd-sysv-generator[154]: SysV service '/etc/init.d/thermal-zone-init' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
    [ 8.865474] systemd-sysv-generator[154]: SysV service '/etc/init.d/edgeai-launcher.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
    [ 9.343458] systemd[1]: /lib/systemd/system/bt-enable.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
    [ 9.465150] systemd[1]: /etc/systemd/system/sync-clocks.service:11: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
    [ 9.575783] systemd[1]: Queued start job for default target Graphical Interface.
    [ 9.648930] systemd[1]: Created slice Slice /system/getty.
    [ OK ] Created slice Slice /system/getty.
    [ 9.674020] systemd[1]: Created slice Slice /system/modprobe.
    [ OK ] Created slice Slice /system/modprobe.
    [ 9.702380] systemd[1]: Created slice Slice /system/serial-getty.
    [ OK ] Created slice Slice /system/serial-getty.
    [ 9.729388] systemd[1]: Created slice User and Session Slice.
    [ OK ] Created slice User and Session Slice.
    [ 9.750905] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [ OK ] Started Dispatch Password …ts to Console Directory Watch.
    [ 9.774675] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [ OK ] Started Forward Password R…uests to Wall Directory Watch.
    [ 9.798859] systemd[1]: Reached target Path Units.
    [ OK ] Reached target Path Units.
    [ 9.814120] systemd[1]: Reached target Remote File Systems.
    [ OK ] Reached target Remote File Systems.
    [ 9.834198] systemd[1]: Reached target Slice Units.
    [ OK ] Reached target Slice Units.
    [ 9.850136] systemd[1]: Reached target Swaps.
    [ OK ] Reached target Swaps.
    [ 9.931588] systemd[1]: Listening on RPCbind Server Activation Socket.
    [ OK ] Listening on RPCbind Server Activation Socket.
    [ 9.958527] systemd[1]: Reached target RPC Port Mapper.
    [ OK ] Reached target RPC Port Mapper.
    [ 10.005166] systemd[1]: Listening on Process Core Dump Socket.
    [ OK ] Listening on Process Core Dump Socket.
    [ 10.026986] systemd[1]: Listening on initctl Compatibility Named Pipe.
    [ OK ] Listening on initctl Compatibility Named Pipe.
    [ 10.052031] systemd[1]: Listening on Journal Audit Socket.
    [ OK ] Listening on Journal Audit Socket.
    [ 10.075502] systemd[1]: Listening on Journal Socket (/dev/log).
    [ OK ] Listening on Journal Socket (/dev/log).
    [ 10.099901] systemd[1]: Listening on Journal Socket.
    [ OK ] Listening on Journal Socket.
    [ 10.118115] systemd[1]: Listening on Network Service Netlink Socket.
    [ OK ] Listening on Network Service Netlink Socket.
    [ 10.143838] systemd[1]: Listening on udev Control Socket.
    [ OK ] Listening on udev Control Socket.
    [ 10.168217] systemd[1]: Listening on udev Kernel Socket.
    [ OK ] Listening on udev Kernel Socket.
    [ 10.192388] systemd[1]: Listening on User Database Manager Socket.
    [ OK ] Listening on User Database Manager Socket.
    [ 10.262783] systemd[1]: Mounting Huge Pages File System...
    Mounting Huge Pages File System...
    [ 10.287734] systemd[1]: Mounting POSIX Message Queue File System...
    Mounting POSIX Message Queue File System...
    [ 10.321984] systemd[1]: Mounting Kernel Debug File System...
    Mounting Kernel Debug File System...
    [ 10.338714] systemd[1]: Kernel Trace File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/tracing).
    [ 10.354138] systemd[1]: tmp.mount: Directory /tmp to mount over is not empty, mounting anyway.
    [ 10.386656] systemd[1]: Mounting Temporary Directory /tmp...
    Mounting Temporary Directory /tmp...
    [ 10.426131] systemd[1]: Starting Create List of Static Device Nodes...
    Starting Create List of Static Device Nodes...
    [ 10.479063] systemd[1]: Starting Load Kernel Module configfs...
    Starting Load Kernel Module configfs...
    [ 10.511542] systemd[1]: Starting Load Kernel Module drm...
    Starting Load Kernel Module drm...
    [ 10.546540] systemd[1]: Starting Load Kernel Module fuse...
    Starting Load Kernel Module fuse...
    [ 10.759265] systemd[1]: Starting Start psplash boot splash screen...
    Starting Start psplash boot splash screen...
    [ 10.965979] fuse: init (API version 7.37)
    [ 10.979475] systemd[1]: Starting RPC Bind...
    Starting RPC Bind...
    [ 10.994401] systemd[1]: File System Check on Root Device was skipped because of a failed condition check (ConditionPathIsReadWrite=!/).
    [ 11.025513] systemd[1]: Starting Journal Service...
    Starting Journal Service...
    [ 11.075056] systemd[1]: Starting Load Kernel Modules...
    Starting Load Kernel Modules...
    [ 11.099960] systemd[1]: Starting Generate network units from Kernel command line...
    Starting Generate network …ts from Kernel command line...
    [ 11.135215] systemd[1]: Starting Remount Root and Kernel File Systems...
    Starting Remount Root and Kernel File Systems...
    [ 11.172139] EXT4-fs (mmcblk1p2): re-mounted. Quota mode: none.
    [ 11.187199] systemd[1]: Starting Coldplug All udev Devices...
    Starting Coldplug All udev Devices...
    [ 11.217470] systemd[1]: Started RPC Bind.
    [ OK ] Started RPC Bind.
    [ 11.234952] systemd[1]: Started Journal Service.
    [ OK ] Started Journal Service.
    [ OK ] Mounted Huge Pages File System.
    [ OK ] Mounted POSIX Message Queue File System.
    [ OK ] Mounted Kernel Debug File System.
    [ OK ] Mounted Temporary Directory /tmp.
    [ OK ] Finished Create List of Static Device Nodes.
    [ OK ] Finished Load Kernel Module configfs.
    [ OK ] Finished Load Kernel Module drm.
    [ OK ] Finished Load Kernel Module fuse.
    [FAILED] Failed to start Start psplash boot splash screen.
    See 'systemctl status psplash-start.service' for details.
    [DEPEND] Dependency failed for Star…progress communication helper.
    [ OK ] Finished Load Kernel Modules.
    [ OK ] Finished Generate network units from Kernel command line.
    [ OK ] Finished Remount Root and Kernel File Systems.
    Mounting FUSE Control File System...
    Mounting Kernel Configuration File System...
    Starting Flush Journal to Persistent Storage...
    Starting Apply Kernel Variables...[ 11.635322] systemd-journald[170]: Received client request to flush runtime journal.
    
    Starting Create Static Device Nodes in /dev...
    [ OK ] Mounted FUSE Control File System.
    [ OK ] Mounted Kernel Configuration File System.
    [ OK ] Finished Flush Journal to Persistent Storage.
    [ OK ] Finished Apply Kernel Variables.
    [ OK ] Finished Create Static Device Nodes in /dev.
    [ OK ] Reached target Preparation for Local File Systems.
    Mounting /media/ram...
    Mounting /var/volatile...
    [ 11.888225] audit: type=1334 audit(1651167749.000:2): prog-id=5 op=LOAD
    [ 11.895007] audit: type=1334 audit(1651167749.008:3): prog-id=6 op=LOAD
    Starting Rule-based Manage…for Device Events and Files...
    [ OK ] Mounted /media/ram.
    [ OK ] Mounted /var/volatile.
    Starting Load/Save Random Seed...
    [ OK ] Reached target Local File Systems.
    Starting Create Volatile Files and Directories...
    [ OK ] Finished Coldplug All udev Devices.
    [ OK ] Finished Create Volatile Files and Directories.
    Starting Network Time Synchronization...
    Starting Record System Boot/Shutdown in UTMP...
    [ OK ] Started Rule-based Manager for Device Events and Files.
    [ OK ] Finished Record System Boot/Shutdown in UTMP.
    [ 12.470082] platform 2b300050.target-module: deferred probe pending
    [ 12.633875] random: crng init done
    [ OK ] Started Network Time Synchronization.
    [ OK ] Finished Load/Save Random Seed.
    [ OK ] Reached target System Initialization.
    [ OK ] Started Daily Cleanup of Temporary Directories.
    [ OK ] Reached target System Time Set.
    [ OK ] Started Daily rotation of log files.
    [ OK ] Reached target Timer Units.
    [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [ OK ] Listening on D-Bus System Message Bus Socket.
    Starting Docker Socket for the API...
    [ OK ] Listening on dropbear.socket.
    [ OK ] Listening on PC/SC Smart Card Daemon Activation Socket.
    Starting Weston socket...
    Starting D-Bus System Message Bus...
    Starting Reboot and dump vmcore via kexec...
    [ OK ] Listening on Docker Socket for the API.
    [ OK ] Listening on Weston socket.
    [ OK ] Reached target Socket Units.
    [ OK ] Finished Reboot and dump vmcore via kexec.
    [ OK ] Found device /dev/ttyS2.
    [ 13.454651] mc: Linux media interface: v0.10
    [ 13.494203] CAN device driver interface
    [ 13.579760] [drm] Initialized tidss 1.0.0 20180215 for 30200000.dss on minor 0
    [ 13.610705] tidss 30200000.dss: [drm] Cannot find any crtc or sizes
    [ 13.618115] tidss 30200000.dss: [drm] Cannot find any crtc or sizes
    [ 13.737037] videodev: Linux video capture interface: v2.00
    [ 13.756606] m_can_platform 20701000.can: m_can device registered (irq=533, version=32)
    [ 13.871002] k3-dsp-rproc 7e000000.dsp: assigned reserved memory node c7x-dma-memory@99800000
    [ 13.880801] k3-dsp-rproc 7e000000.dsp: configured DSP for remoteproc mode
    [ 13.891980] remoteproc remoteproc0: 7e000000.dsp is available
    [ 13.894771] rtc-ti-k3 2b1f0000.rtc: registered as rtc0
    [ 13.901059] k3-dsp-rproc 7e000000.dsp: register pm nitifiers in remoteproc mode
    [ 13.904566] rtc-ti-k3 2b1f0000.rtc: setting system clock to 1970-01-01T00:00:14 UTC (14)
    [ 13.911968] systemd-journald[170]: Time jumped backwards, rotating.
    [ 13.946692] ox02f10: loading out-of-tree module taints kernel.
    [ 13.958424] platform 79000000.r5f: configured R5F for remoteproc mode
    [ 13.958534] ox02f10 2-0036: DEBUG: power_on entry
    [ 13.971966] ox02f10 2-0036: DEBUG: xclk enabled, rate=24000000
    [ 13.974391] platform 79000000.r5f: assigned reserved memory node r5f-dma-memory@9b800000
    [ 13.986683] remoteproc remoteproc1: 79000000.r5f is available
    [ 14.002219] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
    [ 14.014201] platform 78000000.r5f: configured R5F for IPC-only mode
    [ 14.020741] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@9c800000
    [ 14.029005] ox02f10 2-0036: DEBUG: power_on complete
    [ 14.035078] remoteproc remoteproc2: 78000000.r5f is available
    [ 14.043276] remoteproc remoteproc2: attaching to 78000000.r5f
    [ 14.055213] platform 78000000.r5f: R5F core initialized in IPC-only mode
    [ 14.062319] ox02f10 2-0036: detected OX02F10, chip ID 0x5803
    [ 14.062384] rproc-virtio rproc-virtio.6.auto: assigned reserved memory node r5f-dma-memory@9c800000
    [ 14.078420] virtio_rpmsg_bus virtio0: rpmsg host is online
    [ 14.084201] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xd
    [ 14.088787] rproc-virtio rproc-virtio.6.auto: registered virtio0 (type 7)
    [ 14.098348] remoteproc remoteproc2: remote processor 78000000.r5f is now attached
    [ OK ] Started D-Bus System Message Bus.
    [ OK ] Reached target Basic System.
    [ OK ] Started Job spooling tools.
    [ OK ] Started Periodic Command Scheduler.
    Starting DEMO...
    Starting Print notice about GPLv3 packages...
    Starting IPv6 Packet Filtering Framework...
    Starting IPv4 Packet Filtering Framework...
    [ OK ] Started irqbalance daemon.
    Starting Telephony service...
    Starting Expand the rootfs…ll size of the boot device....
    [ OK ] Started strongSwan IPsec I…IKEv2 daemon using ipsec.conf.
    [ 14.812853] audit: type=1334 audit(15.404:4): prog-id=7 op=LOAD
    [ 14.818881] audit: type=1334 audit(15.412:5): prog-id=8 op=LOAD
    Starting User Login Management...
    [ 15.130242] vdec 30210000.video-codec: error -ENXIO: IRQ index 0 not found
    [ 15.137581] vdec 30210000.video-codec: failed to get irq resource, falling back to polling
    [ 15.181976] e5010 fd20000.e5010: Device registered as /dev/video2
    [ OK ] Started TEE Supplicant.
    Starting Telnet Server...
    [ OK ] Finished Telnet Server.
    [ 15.690101] remoteproc remoteproc1: powering up 79000000.r5f
    [ 15.696302] remoteproc remoteproc1: Booting fw image am62a-mcu-r5f0_0-fw, size 8452204
    [ 15.711881] rproc-virtio rproc-virtio.7.auto: assigned reserved memory node r5f-dma-memory@9b800000
    [ 15.723360] virtio_rpmsg_bus virtio1: rpmsg host is online
    [ 15.729467] rproc-virtio rproc-virtio.7.auto: registered virtio1 (type 7)
    [ 15.736688] remoteproc remoteproc1: remote processor 79000000.r5f is now up
    [ 15.746049] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0xd
    [ 15.754178] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
    [ OK ] Finished IPv4 Packet Filtering Framework.
    [ OK ] Finished IPv6 Packet Filtering Framework.
    [ OK ] Reached target Preparation for Network.
    Starting Network Configuration...
    [ 16.254277] remoteproc remoteproc0: powering up 7e000000.dsp
    [ 16.260047] remoteproc remoteproc0: Booting fw image am62a-c71_0-fw, size 11534416
    [ 16.280267] k3-dsp-rproc 7e000000.dsp: booting DSP core using boot addr = 0x99a00000
    [ 16.295245] rproc-virtio rproc-virtio.8.auto: assigned reserved memory node c7x-dma-memory@99800000
    [ 16.306961] virtio_rpmsg_bus virtio2: rpmsg host is online
    
    [ 16.321028] virtio_rpmsg_bus virtio2: creating channel rpmsg_chrdev addr 0xd
    [ 16.327265] rproc-virtio rproc-virtio.8.auto: registered virtio2 (type 7)
    [ 16.334171] virtio_rpmsg_bus virtio2: creating channel rpmsg_chrdev addr 0x15
    [ 16.335325] remoteproc remoteproc0: remote processor 7e000000.dsp is now up
    [ 16.344708] virtio_rpmsg_bus virtio2: creating channel ti.ipc4.ping-pong addr 0xe
    [ 16.357776] virtio_rpmsg_bus virtio2: msg received with no recipient
    [ 16.364555] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0x15
    [ 16.373640] virtio_rpmsg_bus virtio0: creating channel ti.ipc4.ping-pong addr 0xe
    [ 16.382101] virtio_rpmsg_bus virtio0: msg received with no recipient
    [ 16.701406] m_can_platform 20701000.can main_mcan0: renamed from can0
    [ OK ] Started Telephony service.
    [ 16.915976] ox02f10 2-0036: Consider updating driver ox02f10 to match on endpoints
    [ OK ] Reached target Hardware activated USB gadget.
    [ 16.978972] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 4/4 lanes, 4 streams, external D-PHY
    [ 17.031161] xhci-hcd xhci-hcd.9.auto: xHCI Host Controller
    [ 17.042384] xhci-hcd xhci-hcd.9.auto: new USB bus registered, assigned bus number 1
    [ OK ] Listening on Load/Save RF …itch S[ 17.058755] xhci-hcd xhci-hcd.9.auto: USB3 root hub has no ports
    tatus /dev/rfkill Watch.
    [ 17.065960] xhci-hcd xhci-hcd.9.auto: hcc params 0x0258fe6d hci version 0x110 quirks 0x0000008000010010
    [ 17.080676] xhci-hcd xhci-hcd.9.auto: irq 543, io mem 0x31100000
    [ 17.090345] hub 1-0:1.0: USB hub found
    [ 17.094973] hub 1-0:1.0: 1 port detected
    [ OK ] Started DEMO.
    [ 17.354432] cfg80211: Loading compiled-in X.509 certificates for regulatory database
    [ 17.419385] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    [ 17.427426] cfg80211: Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
    [ OK ] Finished Expand the rootfs…full size of the boot device..
    [ 18.172122] Bluetooth: Core ver 2.22
    [ 18.176235] NET: Registered PF_BLUETOOTH protocol family
    [ 18.185030] Bluetooth: HCI device and connection manager initialized
    [ 18.191559] Bluetooth: HCI socket layer initialized
    [ 18.199188] Bluetooth: L2CAP socket layer initialized
    
    [ 18.207791] Bluetooth: SCO socket layer initialized
    Starting Network Name Resolution...
    [ OK ] Started Network Name Resolution.
    [ OK ] Reached target Network.
    [ OK ] Reached target Host and Network Name Lookups.
    Starting Avahi mDNS/DNS-SD Stack...
    Starting Enable and configure wl18xx bluetooth stack...
    Starting containerd container runtime...
    [ OK ] Started Netperf Benchmark Server.
    [ OK ] Started NFS status monitor for NFSv2/3 locking..
    Starting Simple Network Ma…ent Protocol (SNMP) Daemon....
    Starting Permit User Sessions...
    [ OK ] Finished Enable and configure wl18xx bluetooth stack.
    [ OK ] Finished Permit User Sessions.
    [ OK ] Started Getty on tty1.
    [ OK ] Started Serial Getty on ttyS2.
    [ OK ] Reached target Login Prompts.
    Starting Synchronize System and HW clocks...
    Starting Weston, a Wayland…ositor, as a system service...
    [ OK ] Started Avahi mDNS/DNS-SD Stack.
    [ OK ] Finished Synchronize System and HW clocks.
    [ 20.126585] audit: type=1334 audit(20.720:6): prog-id=9 op=LOAD
    [ 20.132879] audit: type=1334 audit(20.728:7): prog-id=10 op=LOAD
    Starting User Database Manager...
    [ OK ] Started User Database Manager.
    [ OK ] Created slice User Slice of UID 1000.
    Starting User Runtime Directory /run/user/1000...
    [ OK ] Finished User Runtime Directory /run/user/1000.
    Starting User Manager for UID 1000...
    [ 21.324686] audit: type=1006 audit(21.916:8): pid=484 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=1 res=1
    [ 21.336777] audit: type=1300 audit(21.916:8): arch=c00000b7 syscall=64 success=yes exit=4 a0=8 a1=ffffe78c2728 a2=4 a3=ffff9b8fb020 items=0 ppid=1 pid=484 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="(systemd)" exe="/lib/systemd/systemd" key=(null)
    [ 21.362753] audit: type=1327 audit(21.916:8): proctitle="(systemd)"
    [ OK ] Started User Manager for UID 1000.
    [ OK ] Started Session c1 of User weston.
    [ OK ] Created slice Slice /system/systemd-fsck.
    [ 22.838066] audit: type=1006 audit(23.432:9): pid=471 uid=0 old-auid=4294967295 auid=1000 tty=tty7 old-ses=4294967295 ses=2 res=1
    [ 22.850175] audit: type=1300 audit(23.432:9): arch=c00000b7 syscall=64 success=yes exit=4 a0=8 a1=ffffe78c2728 a2=4 a3=ffff9b8fb020 items=0 ppid=1 pid=471 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty7 ses=2 comm="(weston)" exe="/lib/systemd/systemd" key=(null)
    [ 22.875890] audit: type=1327 audit(23.432:9): proctitle="(weston)"
    [ OK ] Found device /dev/mmcblk1p1.
    Starting File System Check on /dev/mmcblk1p1...
    
    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|
    
    Arago Project am62axx-evm -
    
    Arago 2023.10 am62axx-evm -
    
    am62axx-evm login:
    am62axx-evm login: root
    [ 29.544113] audit: type=1006 audit(30.136:10): pid=713 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=3 res=1
    [ 29.556111] audit: type=1300 audit(30.136:10): arch=c00000b7 syscall=64 success=yes exit=1 a0=8 a1=ffffe78c2728 a2=1 a3=ffff9b8fb020 items=0 ppid=1 pid=713 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="(systemd)" exe="/lib/systemd/systemd" key=(null)
    [ 29.582006] audit: type=1327 audit(30.136:10): proctitle="(systemd)"
    [ 29.588447] audit: type=1334 audit(30.164:11): prog-id=11 op=LOAD
    [ 29.594842] audit: type=1300 audit(30.164:11): arch=c00000b7 syscall=280 success=yes exit=8 a0=5 a1=ffffe00d30e0 a2=78 a3=0 items=0 ppid=1 pid=713 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="systemd" exe="/lib/systemd/systemd" key=(null)
    [ 29.619731] audit: type=1327 audit(30.164:11): proctitle="(systemd)"
    [ 29.626506] audit: type=1334 audit(30.176:12): prog-id=11 op=UNLOAD
    [ 29.633231] audit: type=1334 audit(30.176:13): prog-id=12 op=LOAD
    [ 29.639588] audit: type=1300 audit(30.176:13): arch=c00000b7 syscall=280 success=yes exit=8 a0=5 a1=ffffe00d3180 a2=78 a3=0 items=0 ppid=1 pid=713 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="systemd" exe="/lib/systemd/systemd" key=(null)
    [ 29.664346] audit: type=1327 audit(30.176:13): proctitle="(systemd)"
    Unable to setup formats: Inappropriate ioctl for device (25)
    Unable to setup formats: Inappropriate ioctl for device (25)
    Unable to setup formats: Inappropriate ioctl for device (25)
    OX02F10 Camera 0 detected
    device = /dev/video-ox02f10-cam0
    name = ox02f10
    format = [fmt:SRGGB10_1X10/1920x1080@1/30 field:none]
    subdev_id = /dev/v4l-ox02f10-subdev0
    isp_required = yes
    root@am62axx-evm:/opt/edgeai-gst-apps# cd /
    root@am62axx-evm:/# ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPL-3.0 packages:
    adwaita-icon-theme-symbolic
    autoconf
    bash-dev
    bash
    bc
    binutils
    cifs-utils
    coreutils-stdbuf
    coreutils
    cpio
    cpp-symlinks
    cpp
    dosfstools
    elfutils
    g++-symlinks
    g++
    gawk
    gcc-symlinks
    gcc
    gdb
    gdbserver
    gettext
    glmark2
    gnu-config
    grub-common
    grub-editenv
    grub-efi
    gzip
    hidapi
    less
    libasm1
    libatomic-dev
    libatomic1
    libbfd
    libdebuginfod1
    libdw1
    libeigen-dev
    libelf1
    libgcc-s-dev
    libgcc1
    libgdbm-compat4
    libgdbm-dev
    libgdbm6
    libgettextlib
    libgettextsrc
    libgmp10
    libidn2-0
    libmpc3
    libmpfr6
    libopcodes
    libqt5charts-examples
    libqt5charts-plugins
    libqt5charts-qmlplugins
    libqt5charts5
    libqt5sensors-plugins
    libqt5sensors-qmlplugins
    libqt5sensors5
    libqt5serialport-examples
    libqt5serialport-plugins
    libqt5serialport-qmlplugins
    libqt5serialport5
    libqt5svg-examples
    libqt5svg-plugins
    libqt5svg-qmlplugins
    libqt5svg5
    libqt5virtualkeyboard-plugins
    libqt5virtualkeyboard-qmlplugins
    libqt5virtualkeyboard5
    libqt5webchannel-plugins
    libqt5webchannel-qmlplugins
    libqt5webchannel5
    libreadline-dev
    libreadline8
    libstdc++-dev
    libstdc++6
    libunistring2
    m4-dev
    m4
    make
    nettle
    parted
    piglit
    qt3d-plugins
    qt3d-qmlplugins
    qt3d
    qtbase-examples
    qtbase-plugins
    qtbase-qmlplugins
    qtbase
    qtconnectivity-plugins
    qtconnectivity-qmlplugins
    qtconnectivity
    qtdeclarative-plugins
    qtdeclarative-qmlplugins
    qtdeclarative-tools
    qtdeclarative
    qtgraphicaleffects-qmlplugins
    qtlocation-examples
    qtlocation-plugins
    qtlocation-qmlplugins
    qtlocation
    qtmultimedia-examples
    qtmultimedia-plugins
    qtmultimedia-qmlplugins
    qtmultimedia
    qtquick3d-plugins
    qtquick3d-qmlplugins
    qtquick3d
    qtquics-qmlplugins.control
    qtquics2-plugins.control
    qtquics2-qmlplugins.control
    qtquics2.control
    qtscript-examples
    qtscript-plugins
    qtscript-qmlplugins
    qtscript
    qtwayland-examples
    qtwayland-plugins
    qtwayland-qmlplugins
    qtwayland
    tar
    which
    
    If you do not wish to distribute GPL-3.0 components please remove
    the above packages prior to distribution. This can be done using
    the opkg remove command. i.e.:
    opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
    will be notified of the dependent packages. You should
    use the --force-removal-of-dependent-packages option to
    also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    
    root@am62axx-evm:/# dmesg | grep -Ei 'ox02f10|csi'
    [ 0.521310] SCSI subsystem initialized
    [ 0.890581] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
    [ 13.946692] ox02f10: loading out-of-tree module taints kernel.
    [ 13.958534] ox02f10 2-0036: DEBUG: power_on entry
    [ 13.971966] ox02f10 2-0036: DEBUG: xclk enabled, rate=24000000
    [ 14.029005] ox02f10 2-0036: DEBUG: power_on complete
    [ 14.062319] ox02f10 2-0036: detected OX02F10, chip ID 0x5803
    [ 16.915976] ox02f10 2-0036: Consider updating driver ox02f10 to match on endpoints
    [ 16.978972] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 4/4 lanes, 4 streams, external D-PHY
    root@am62axx-evm:/# media-ctl -p
    Media controller API version 6.1.80
    
    Media device information
    ------------------------
    driver j721e-csi2rx
    model TI-CSI2RX
    serial
    bus info platform:30102000.ticsi2rx
    hw revision 0x1
    driver version 6.1.80
    
    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev0
    routes:
    0/0 -> 1/0 [ACTIVE]
    pad0: Sink
    [stream:0 fmt:SRGGB10_1X10/1920x1080 field:none]
    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:SRGGB10_1X10/1920x1080 field:none]
    -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
    pad2: Source
    -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
    pad3: Source
    -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
    pad4: Source
    -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
    pad5: Source
    -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
    pad6: Source
    -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
    
    - entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev1
    routes:
    0/0 -> 1/0 [ACTIVE]
    pad0: Sink
    [stream:0 fmt:SRGGB10_1X10/1920x1080 field:none]
    <- "ox02f10 2-0036":0 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:SRGGB10_1X10/1920x1080 field:none]
    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    pad2: Source
    pad3: Source
    pad4: Source
    
    - entity 15: ox02f10 2-0036 (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:SRGGB10_1X10/1920x1080@1/60 field:none colorspace:raw xfer:none quantization:full-range
    crop.bounds:(0,0)/1920x1080
    crop:(0,0)/1920x1080]
    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
    
    - entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video3
    pad0: Sink
    <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
    
    - entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video4
    pad0: Sink
    <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
    
    - entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video5
    pad0: Sink
    <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
    
    - entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video6
    pad0: Sink
    <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
    
    - entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video7
    pad0: Sink
    <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
    
    - entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video8
    pad0: Sink
    <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]
    root@am62axx-evm:/# v4l2-ctl -d /dev/video-ox02f10-cam0 \
    > --set-fmt-video=width=1920,height=1080,pixelformat=RG10
    root@am62axx-evm:/# v4l2-ctl -d /dev/v4l-subdev2 --list-ctrls
    
    User Controls
    
    exposure 0x00980911 (int) : min=1 max=584 step=1 default=391 value=391
    
    Image Source Controls
    
    analogue_gain 0x009e0903 (int) : min=0 max=255 step=1 default=48 value=48
    
    Image Processing Controls
    
    link_frequency 0x009f0901 (intmenu): min=0 max=0 default=0 value=0 (480000000 0x1c9c3800) flags=read-only
    pixel_rate 0x009f0902 (int64) : min=384000000 max=384000000 step=1 default=384000000 value=384000000 flags=read-only
    root@am62axx-evm:/# v4l2-ctl -d /dev/video-ox02f10-cam0 \
    > --get-fmt-video
    Format Video Capture:
    Width/Height : 1920/1080
    Pixel Format : 'RG10' (10-bit Bayer RGRG/GBGB)
    Field : None
    Bytes per Line : 3840
    Size Image : 4147200
    Colorspace : sRGB
    Transfer Function : Default (maps to sRGB)
    YCbCr/HSV Encoding: Default (maps to ITU-R 601)
    Quantization : Default (maps to Full Range)
    Flags :
    root@am62axx-evm:/# v4l2-ctl -d /dev/video-ox02f10-cam0 \
    > --stream-mmap=4 \
    > --stream-count=30 \
    > --stream-to=/dev/null \
    > --verbose
    VIDIOC_QUERYCAP: ok
    VIDIOC_REQBUFS returned 0 (Success)
    VIDIOC_QUERYBUF returned 0 (Success)
    VIDIOC_QUERYBUF return[ 190.155130] ox02f10 2-0036: DEBUG: set_stream enable=1
    ed 0 (Success)
    VIDIOC_QUERYBUF returned 0 (Success)
    VIDIOC[ 190.163401] ox02f10 2-0036: DEBUG: runtime_resume called
    _QUERYBUF returned 0 (Success)
    VIDIOC_QBUF returned 0 (Succes[ 190.174824] ox02f10 2-0036: DEBUG: power_on entry
    s)
    VIDIOC_QBUF returned 0 (Success)
    VIDIOC_QBUF returned 0[ 190.184487] ox02f10 2-0036: DEBUG: xclk enabled, rate=24000000
    (Success)
    VIDIOC_QBUF returned 0 (Success)
    [ 190.237841] ox02f10 2-0036: DEBUG: power_on complete
    [ 190.242843] ox02f10 2-0036: DEBUG: start_streaming entered
    [ 190.248582] ox02f10 2-0036: DEBUG: software reset OK
    [ 190.263629] ox02f10 2-0036: DEBUG: writing mode register table
    [ 190.506594] ox02f10 2-0036: DEBUG: mode register table OK
    [ 190.512306] ox02f10 2-0036: DEBUG: controls OK
    [ 190.536935] ox02f10 2-0036: DEBUG: MODE_SELECT=STREAMING OK
    [ 190.542860] ox02f10 2-0036: DEBUG: REG 0100 = 0x01
    [ 190.547934] ox02f10 2-0036: DEBUG: REG 3808 = 0x07
    [ 190.552924] ox02f10 2-0036: DEBUG: REG 3809 = 0x80
    [ 190.557951] ox02f10 2-0036: DEBUG: REG 380A = 0x04
    [ 190.563016] ox02f10 2-0036: DEBUG: REG 380B = 0x38
    [ 190.567999] ox02f10 2-0036: DEBUG: REG 380C = 0x09
    [ 190.572994] ox02f10 2-0036: DEBUG: REG 380D = 0xf8
    [ 190.577987] ox02f10 2-0036: DEBUG: REG 380E = 0x02
    [ 190.583000] ox02f10 2-0036: DEBUG: REG 380F = 0x50
    [ 190.587968] ox02f10 2-0036: DEBUG: REG 4800 = 0x04
    [ 190.592943] ox02f10 2-0036: DEBUG: REG 4837 = 0x20
    VIDIOC_STREAMON returned 0 (Success)
    
    cap dqbuf: 0 seq:      0 bytesused: 4147200 ts: 380.994804 (ts-monotonic, ts-src-eof)
    
    
    ^C[ 226.089764] ox02f10 2-0036: DEBUG: set_stream enable=0
    
    root@am62axx-evm:/#


    Soo i am not getting the frames as per requirement i.e 30fps.

    Kindly requesting to you review the code and log for the same.

    Your support and guidance to bringup the camera is highly appreciated!

    Thanks & Regards,
    Undali Muniranga

  • Hi Undali,

    Can you please share the device tree overlay that you have written for this? There might be potential issues with the CSI2RX configuration there. It would help to verify that.

    Also, when streaming, please get the values of the following registers and share them as well:

    1. CSIRX_INFO_IRQS - 0x30101020
    2. CSIRX_ERROR_IRQS - 0x30101028
    3. CSIRX_DPHY_STATUS - 0x30101048
    4. CSIRX_DPHY_ERR_STATUS_IRQ - 0x3010104C
    5. CSIRX_STREAM0_STATUS - 0x30101104

    Also, I have edited your reply to place the log dump in a code block. Please use that as it makes the thread more navigable. You can go to Insert -> Code for doing the same.

    Regards,
    Jay

  • Hello  ,

    Thank you for your reply!!

    As you are requested, i am attaching the camera overlay file for the same. Please find the file:

    /*
     * 
     * Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
     */
    /*
     * OX02F10 Camera Module
     * Custom AM62A board
     *
     * Direct connection:
     *
     * Camera <---- FPC ----> AM62A
     *
     * I2C3:
     *   SoC_I2C3_SCL_CAM
     *   SoC_I2C3_SDA_CAM
     *
     * CSI0:
     *   SOC_CSI0_RXCLKP/N
     *   SOC_CSI0_RXP0/N0
     *   SOC_CSI0_RXP1/N1
     *   SOC_CSI0_RXP2/N2
     *   SOC_CSI0_RXP3/N3
     *
     * Control:
     *   CAMERA_RST_N
     *   CAMERA_ERRB
     */
    
    /dts-v1/;
    /plugin/;
    
    #include <dt-bindings/gpio/gpio.h>
    //#include <dt-bindings/gpio/gpio.h>
    //#include <dt-bindings/pinctrl/k3.h>
    
    &{/} {
    	clk_ox02f10_fixed: ox02f10-xclk {
    		compatible = "fixed-clock";
    		#clock-cells = <0>;
    		clock-frequency = <24000000>;
    	};
    };
    
    /*
     * Camera is directly connected to MAIN_I2C3.
     *
     * There is NO PCA9543 I2C switch on custom board.
     */
     
    
    
    &main_i2c3 {
    	#address-cells = <1>;
    	#size-cells = <0>;
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c3_pins_default
    	 			&camera_pins_default>;
    	clock-frequency = <400000>;
    
    	ox02f10: camera@36 {
    		compatible = "ovti,ox02f10";
    		reg = <0x36>;
    
    		clocks = <&clk_ox02f10_fixed>;
    		clock-names = "inck";
    		/*
    		 * Y18 = GPIO0_90
    		 *
    		 * CAMERA_RST_N is active-low.
    		 */
    
    		reset-gpios = <&main_gpio0 90 GPIO_ACTIVE_LOW>;
    		errb-gpios = <&main_gpio1 1 GPIO_ACTIVE_LOW>;
    
    		port {
    			csi2_cam0: endpoint {
    			remote-endpoint = <&csi2rx0_in_sensor>;
    			link-frequencies = /bits/ 64 <480000000>;
    			bus-type = <4>;          /* MIPI CSI-2 D-PHY */
    			clock-lanes = <0>;
    			data-lanes = <1 2 3 4>;
    			};
    		};
    	};
    };
    
    
    &csi0_port0 {
    	status = "okay";
    	csi2rx0_in_sensor: endpoint {
    		remote-endpoint = <&csi2_cam0>;
    		bus-type = <4>; /* CSI2 DPHY. */
    		clock-lanes = <0>;
    		data-lanes = <1 2 3 4>;
    	};
    };
    

    I think as per the log stream frames are receiving but not as per 30fps. Detailed log mentioned in above attached log.

    Please find the detailed log:LogCamera.txt

    I have added some debug points in cdns-csi2rx.c and sensor driver file. Please find the files for the same.

    // SPDX-License-Identifier: GPL-2.0
    /*
     * OmniVision OX02F10 image sensor driver
     *
     * The module register sequence and its nominal 1080p30 RAW10 mode are
     * retained from the board driver. Changes to the CSI-2 configuration or
     * timing require a matching register sequence from the module vendor.
     */
    #include <linux/clk.h>
    #include <linux/delay.h>
    #include <linux/gpio/consumer.h>
    #include <linux/i2c.h>
    #include <linux/module.h>
    #include <linux/mutex.h>
    #include <linux/pm_runtime.h>
    #include <linux/regmap.h>
    #include <media/v4l2-ctrls.h>
    #include <media/v4l2-device.h>
    #include <media/v4l2-event.h>
    #include <media/v4l2-fwnode.h>
    #include <media/v4l2-subdev.h>
    
    #define OX02F10_REG_MODE_SELECT		0x0100
    #define OX02F10_MODE_STANDBY		0x00
    #define OX02F10_MODE_STREAMING		0x01
    #define OX02F10_REG_SOFTWARE_RESET	0x0103
    #define OX02F10_REG_CHIP_ID		0x300a
    /* Register 0x300a contains 0x58; register 0x300b contains 0x03. */
    #define OX02F10_CHIP_ID			0x5803
    #define OX02F10_WIDTH			1920
    #define OX02F10_HEIGHT			1080
    #define OX02F10_FPS			30
    #define OX02F10_BITS_PER_PIXEL		12
    #define OX02F10_XCLK_FREQ		24000000
    #define OX02F10_NUM_DATA_LANES		4
    #define OX02F10_LINK_FREQ			480000000LL
    #define OX02F10_MEDIA_BUS_CODE		MEDIA_BUS_FMT_SRGGB12_1X12
    
    #define OX02F10_REG_EXPOSURE		0x3501 
    #define OX02F10_REG_ANALOG_GAIN		0x3506
    #define OX02F10_VTS_DEFAULT		0x0250
    #define OX02F10_EXPOSURE_MIN		1
    #define OX02F10_EXPOSURE_DEFAULT		0x0187
    #define OX02F10_EXPOSURE_MARGIN		8
    
    /* Raw gain register encoding retained from the board driver. */
    #define OX02F10_ANALOG_GAIN_MIN		0x00
    #define OX02F10_ANALOG_GAIN_MAX		0xff
    #define OX02F10_ANALOG_GAIN_DEFAULT	0x30
    
    static const s64 ox02f10_link_freq_menu[] = {
    	OX02F10_LINK_FREQ,
    };
    
    static const struct regmap_config ox02f10_regmap_config = {
    	.reg_bits = 16,
    	.val_bits = 8,
    };
    
    static const struct reg_sequence ox02f10_1920x1080_regs[] = {
    	{ 0x0107, 0x01 }, { 0x4d5a, 0x1c }, { 0x4d09, 0xff }, { 0x4d09, 0xdf },
    	{ 0x3208, 0x04 }, { 0x4620, 0x04 }, { 0x3208, 0x14 }, { 0x3208, 0x05 },
    	{ 0x4620, 0x04 }, { 0x3208, 0x15 }, { 0x3208, 0x02 }, { 0x3507, 0x00 },
    	{ 0x3208, 0x12 }, { 0x3208, 0xa2 }, { 0x0301, 0xc8 }, { 0x0303, 0x03 },
    	{ 0x0304, 0x01 }, { 0x0305, 0x90 }, { 0x0306, 0x04 }, { 0x0307, 0x03 },
    	{ 0x0309, 0x02 }, { 0x0316, 0x00 }, { 0x0317, 0x00 }, { 0x0318, 0x00 },
    	{ 0x0323, 0x05 }, { 0x0324, 0x01 }, { 0x0325, 0x20 }, { 0x0362, 0x8e },
    	{ 0x0400, 0xe0 }, { 0x0401, 0x7e }, { 0x0403, 0xde }, { 0x0404, 0x34 },
    	{ 0x0405, 0x3e }, { 0x0406, 0x5c }, { 0x0407, 0x08 }, { 0x0408, 0xe0 },
    	{ 0x0409, 0x4e }, { 0x040a, 0xde }, { 0x040b, 0x34 }, { 0x040c, 0xb3 },
    	{ 0x040d, 0x72 }, { 0x040e, 0x08 }, { 0x2803, 0xfe }, { 0x280b, 0x00 },
    	{ 0x280c, 0x79 }, { 0x3001, 0x03 }, { 0x3002, 0xf8 }, { 0x3005, 0x80 },
    	{ 0x3007, 0x01 }, { 0x3008, 0x80 }, { 0x3012, 0x41 }, { 0x3020, 0x05 },
    	{ 0x3700, 0x28 }, { 0x3701, 0x15 }, { 0x3702, 0x19 }, { 0x3703, 0x23 },
    	{ 0x3704, 0x0a }, { 0x3705, 0x00 }, { 0x3706, 0x3e }, { 0x3707, 0x0d },
    	{ 0x3708, 0x50 }, { 0x3709, 0x5a }, { 0x370a, 0x00 }, { 0x370b, 0x96 },
    	{ 0x3711, 0x11 }, { 0x3712, 0x13 }, { 0x3717, 0x02 }, { 0x3718, 0x73 },
    	{ 0x372c, 0x40 }, { 0x3733, 0x01 }, { 0x3738, 0x36 }, { 0x3739, 0x36 },
    	{ 0x373a, 0x25 }, { 0x373b, 0x25 }, { 0x373f, 0x21 }, { 0x3740, 0x21 },
    	{ 0x3741, 0x21 }, { 0x3742, 0x21 }, { 0x3747, 0x28 }, { 0x3748, 0x28 },
    	{ 0x3749, 0x19 }, { 0x3755, 0x1a }, { 0x3756, 0x0a }, { 0x3757, 0x1c },
    	{ 0x3765, 0x19 }, { 0x3766, 0x05 }, { 0x3767, 0x05 }, { 0x3768, 0x13 },
    	{ 0x376c, 0x07 }, { 0x3778, 0x20 }, { 0x377c, 0xc8 }, { 0x3781, 0x02 },
    	{ 0x3783, 0x02 }, { 0x379c, 0x58 }, { 0x379e, 0x00 }, { 0x379f, 0x00 },
    	{ 0x37a0, 0x00 }, { 0x37bc, 0x22 }, { 0x37c0, 0x01 }, { 0x37c4, 0x3e },
    	{ 0x37c5, 0x3e }, { 0x37c6, 0x2a }, { 0x37c7, 0x28 }, { 0x37c8, 0x02 },
    	{ 0x37c9, 0x12 }, { 0x37cb, 0x29 }, { 0x37cd, 0x29 }, { 0x37d2, 0x00 },
    	{ 0x37d3, 0x73 }, { 0x37d6, 0x00 }, { 0x37d7, 0x6b }, { 0x37dc, 0x00 },
    	{ 0x37df, 0x54 }, { 0x37e2, 0x00 }, { 0x37e3, 0x00 }, { 0x37f8, 0x00 },
    	{ 0x37f9, 0x01 }, { 0x37fa, 0x00 }, { 0x37fb, 0x19 }, { 0x3c03, 0x01 },
    	{ 0x3c04, 0x01 }, { 0x3c06, 0x21 }, { 0x3c08, 0x01 }, { 0x3c09, 0x01 },
    	{ 0x3c0a, 0x01 }, { 0x3c0b, 0x21 }, { 0x3c13, 0x21 }, { 0x3c14, 0x82 },
    	{ 0x3c16, 0x13 }, { 0x3c21, 0x00 }, { 0x3c22, 0xf3 }, { 0x3c37, 0x12 },
    	{ 0x3c38, 0x31 }, { 0x3c3c, 0x00 }, { 0x3c3d, 0x03 }, { 0x3c44, 0x16 },
    	{ 0x3c5c, 0x8a }, { 0x3c5f, 0x03 }, { 0x3c61, 0x80 }, { 0x3c6f, 0x2b },
    	{ 0x3c70, 0x5f }, { 0x3c71, 0x2c }, { 0x3c72, 0x2c }, { 0x3c73, 0x2c },
    	{ 0x3c76, 0x12 }, { 0x3182, 0x12 }, { 0x320e, 0x00 }, { 0x320f, 0x00 },
    	{ 0x3211, 0x61 }, { 0x3215, 0xcd }, { 0x3219, 0x08 }, { 0x3506, 0x30 },
    	{ 0x350a, 0x01 }, { 0x350b, 0x00 }, { 0x350c, 0x00 }, { 0x3586, 0x60 },
    	{ 0x358a, 0x01 }, { 0x358b, 0x00 }, { 0x358c, 0x00 }, { 0x3541, 0x00 },
    	{ 0x3542, 0x04 }, { 0x3546, 0x20 }, { 0x3548, 0x04 }, { 0x3549, 0x40 },
    	{ 0x354a, 0x01 }, { 0x354b, 0x00 }, { 0x354c, 0x00 }, { 0x35c1, 0x00 },
    	{ 0x35c2, 0x02 }, { 0x35c6, 0xa0 }, { 0x3600, 0x8f }, { 0x3605, 0x16 },
    	{ 0x3609, 0xf0 }, { 0x360a, 0x01 }, { 0x360e, 0x1d }, { 0x360f, 0x10 },
    	{ 0x3610, 0x70 }, { 0x3611, 0x3a }, { 0x3612, 0x28 }, { 0x361a, 0x29 },
    	{ 0x361b, 0x6c }, { 0x361c, 0x0b }, { 0x361d, 0x00 }, { 0x361e, 0xfc },
    	{ 0x362a, 0x00 }, { 0x364d, 0x0f }, { 0x364e, 0x18 }, { 0x364f, 0x12 },
    	{ 0x3653, 0x1c }, { 0x3654, 0x00 }, { 0x3655, 0x1f }, { 0x3656, 0x1f },
    	{ 0x3657, 0x0c }, { 0x3658, 0x0a }, { 0x3659, 0x14 }, { 0x365a, 0x18 },
    	{ 0x365b, 0x14 }, { 0x365c, 0x10 }, { 0x365e, 0x12 }, { 0x3674, 0x08 },
    	{ 0x3677, 0x3a }, { 0x3678, 0x3a }, { 0x3679, 0x19 }, { 0x3802, 0x00 },
    	{ 0x3803, 0x68 }, { 0x3806, 0x04 }, { 0x3807, 0xa7 }, { 0x3808, 0x07 },
    	{ 0x3809, 0x80 }, { 0x380a, 0x04 }, { 0x380b, 0x38 }, { 0x380c, 0x09 },
    	{ 0x380d, 0xf8 }, { 0x380e, 0x02 }, { 0x380f, 0x50 }, { 0x3810, 0x00 },
    	{ 0x3811, 0x08 }, { 0x3812, 0x00 }, { 0x3813, 0x04 }, { 0x3816, 0x01 },
    	{ 0x3817, 0x01 }, { 0x381c, 0x18 }, { 0x381e, 0x01 }, { 0x381f, 0x01 },
    	{ 0x3820, 0x20 }, { 0x3821, 0x19 }, { 0x3832, 0x00 }, { 0x3834, 0x00 },
    	{ 0x384c, 0x04 }, { 0x384d, 0xc8 }, { 0x3850, 0x00 }, { 0x3851, 0x42 },
    	{ 0x3852, 0x00 }, { 0x3853, 0x40 }, { 0x3858, 0x04 }, { 0x388c, 0x05 },
    	{ 0x388d, 0x0e }, { 0x3b40, 0x05 }, { 0x3b41, 0x40 }, { 0x3b42, 0x00 },
    	{ 0x3b43, 0x90 }, { 0x3b44, 0x02 }, { 0x3b45, 0x00 }, { 0x3b46, 0x02 },
    	{ 0x3b47, 0x00 }, { 0x3b48, 0x19 }, { 0x3b49, 0x12 }, { 0x3b4a, 0x16 },
    	{ 0x3b4b, 0x2e }, { 0x3b4c, 0x03 }, { 0x3b4d, 0x00 }, { 0x3b86, 0x00 },
    	{ 0x3b87, 0x34 }, { 0x3b88, 0x00 }, { 0x3b89, 0x08 }, { 0x3b8a, 0x05 },
    	{ 0x3b8b, 0x00 }, { 0x3b8c, 0x07 }, { 0x3b8d, 0x80 }, { 0x3b8e, 0x00 },
    	{ 0x3b8f, 0x00 }, { 0x3b92, 0x05 }, { 0x3b93, 0x00 }, { 0x3b94, 0x07 },
    	{ 0x3b95, 0x80 }, { 0x3b9e, 0x09 }, { 0x3d85, 0x05 }, { 0x3d8a, 0x03 },
    	{ 0x3d8b, 0xff }, { 0x3d99, 0x00 }, { 0x3d9a, 0x9f }, { 0x3d9b, 0x00 },
    	{ 0x3d9c, 0xa0 }, { 0x3da4, 0x00 }, { 0x3da7, 0x50 }, { 0x420e, 0x6b },
    	{ 0x420f, 0x6e }, { 0x4210, 0x06 }, { 0x4211, 0xc1 }, { 0x421e, 0x02 },
    	{ 0x421f, 0x45 }, { 0x4220, 0xe1 }, { 0x4221, 0x01 }, { 0x4301, 0xff },
    	{ 0x4307, 0x03 }, { 0x4308, 0x13 }, { 0x430a, 0x13 }, { 0x430d, 0x93 },
    	{ 0x430f, 0x57 }, { 0x4310, 0x95 }, { 0x4311, 0x16 }, { 0x4316, 0x00 },
    	{ 0x4317, 0x38 }, { 0x4319, 0x03 }, { 0x431a, 0x00 }, { 0x431b, 0x00 },
    	{ 0x431d, 0x2a }, { 0x431e, 0x11 }, { 0x431f, 0x20 }, { 0x4320, 0x19 },
    	{ 0x4323, 0x80 }, { 0x4324, 0x00 }, { 0x4503, 0x4e }, { 0x4505, 0x00 },
    	{ 0x4509, 0x00 }, { 0x450a, 0x00 }, { 0x4580, 0xf8 }, { 0x4583, 0x07 },
    	{ 0x4584, 0x6a }, { 0x4585, 0x08 }, { 0x4586, 0x05 }, { 0x4587, 0x04 },
    	{ 0x4588, 0x73 }, { 0x4589, 0x05 }, { 0x458a, 0x1f }, { 0x458b, 0x02 },
    	{ 0x458c, 0xdc }, { 0x458d, 0x03 }, { 0x458e, 0x02 }, { 0x4597, 0x07 },
    	{ 0x4598, 0x40 }, { 0x4599, 0x0e }, { 0x459a, 0x0e }, { 0x459b, 0xf5 },
    	{ 0x459c, 0xf1 }, { 0x4602, 0x00 }, { 0x4603, 0x13 }, { 0x4604, 0x00 },
    	{ 0x4609, 0x0a }, { 0x460a, 0x30 }, { 0x4610, 0x00 }, { 0x4611, 0x40 },
    	{ 0x4612, 0x01 }, { 0x4613, 0x00 }, { 0x4614, 0x00 }, { 0x4615, 0x40 },
    	{ 0x4616, 0x01 }, { 0x4617, 0x00 }, { 0x4800, 0x04 }, { 0x480a, 0x22 },
    	{ 0x4813, 0xe4 }, { 0x4814, 0x2a }, { 0x4837, 0x20 }, { 0x484b, 0x47 },
    	{ 0x484f, 0x00 }, { 0x4887, 0x51 }, { 0x4d00, 0x4a }, { 0x4d01, 0x18 },
    	{ 0x4d05, 0xff }, { 0x4d06, 0x88 }, { 0x4d08, 0x63 }, { 0x4d09, 0xdf },
    	{ 0x4d15, 0x7d }, { 0x4d1a, 0x20 }, { 0x4d30, 0x0a }, { 0x4d31, 0x00 },
    	{ 0x4d34, 0x7d }, { 0x4d3c, 0x7d }, { 0x4f00, 0x7f }, { 0x4f01, 0xff },
    	{ 0x4f02, 0xff }, { 0x4f03, 0x20 }, { 0x4f04, 0xe0 }, { 0x6a00, 0x00 },
    	{ 0x6a01, 0x20 }, { 0x6a02, 0x00 }, { 0x6a03, 0x20 }, { 0x6a04, 0x02 },
    	{ 0x6a05, 0x80 }, { 0x6a06, 0x01 }, { 0x6a07, 0xe0 }, { 0x6a08, 0xcf },
    	{ 0x6a09, 0x01 }, { 0x6a0a, 0x40 }, { 0x6a20, 0x00 }, { 0x6a21, 0x02 },
    	{ 0x6a22, 0x00 }, { 0x6a23, 0x00 }, { 0x6a24, 0x00 }, { 0x6a25, 0x00 },
    	{ 0x6a26, 0x00 }, { 0x6a27, 0x00 }, { 0x6a28, 0x00 }, { 0x5000, 0x8f },
    	{ 0x5001, 0x75 }, { 0x5002, 0x7f }, { 0x5003, 0x7a }, { 0x5004, 0x3e },
    	{ 0x5005, 0x1e }, { 0x5006, 0x1e }, { 0x5007, 0x1e }, { 0x5008, 0x00 },
    	{ 0x500c, 0x00 }, { 0x502c, 0x00 }, { 0x502e, 0x00 }, { 0x502f, 0x00 },
    	{ 0x504b, 0x00 }, { 0x5053, 0x00 }, { 0x505b, 0x00 }, { 0x5063, 0x00 },
    	{ 0x5070, 0x00 }, { 0x5074, 0x04 }, { 0x507a, 0x04 }, { 0x507b, 0x09 },
    	{ 0x5500, 0x02 }, { 0x5700, 0x02 }, { 0x5900, 0x02 }, { 0x6007, 0x04 },
    	{ 0x6008, 0x05 }, { 0x6009, 0x02 }, { 0x600b, 0x08 }, { 0x600c, 0x07 },
    	{ 0x600d, 0x88 }, { 0x6016, 0x00 }, { 0x6027, 0x04 }, { 0x6028, 0x05 },
    	{ 0x6029, 0x02 }, { 0x602b, 0x08 }, { 0x602c, 0x07 }, { 0x602d, 0x88 },
    	{ 0x6047, 0x04 }, { 0x6048, 0x05 }, { 0x6049, 0x02 }, { 0x604b, 0x08 },
    	{ 0x604c, 0x07 }, { 0x604d, 0x88 }, { 0x6067, 0x04 }, { 0x6068, 0x05 },
    	{ 0x6069, 0x02 }, { 0x606b, 0x08 }, { 0x606c, 0x07 }, { 0x606d, 0x88 },
    	{ 0x6087, 0x04 }, { 0x6088, 0x05 }, { 0x6089, 0x02 }, { 0x608b, 0x08 },
    	{ 0x608c, 0x07 }, { 0x608d, 0x88 }, { 0x5e00, 0x00 }, { 0x5e01, 0x09 },
    	{ 0x5e02, 0x09 }, { 0x5e03, 0x0a }, { 0x5e04, 0x0a }, { 0x5e05, 0x0a },
    	{ 0x5e06, 0x0b }, { 0x5e07, 0x0b }, { 0x5e08, 0x0c }, { 0x5e09, 0x0c },
    	{ 0x5e0a, 0x0d }, { 0x5e0b, 0x0d }, { 0x5e0c, 0x0e }, { 0x5e0d, 0x0e },
    	{ 0x5e0e, 0x0f }, { 0x5e0f, 0x0f }, { 0x5e10, 0x10 }, { 0x5e11, 0x10 },
    	{ 0x5e12, 0x11 }, { 0x5e13, 0x11 }, { 0x5e14, 0x12 }, { 0x5e15, 0x12 },
    	{ 0x5e16, 0x12 }, { 0x5e17, 0x12 }, { 0x5e18, 0x13 }, { 0x5e19, 0x13 },
    	{ 0x5e1a, 0x13 }, { 0x5e1b, 0x14 }, { 0x5e1c, 0x14 }, { 0x5e1d, 0x14 },
    	{ 0x5e1e, 0x15 }, { 0x5e1f, 0x15 }, { 0x5e20, 0x15 }, { 0x5e21, 0x16 },
    	{ 0x5e22, 0x00 }, { 0x5e23, 0x02 }, { 0x5e26, 0x00 }, { 0x5e27, 0xff },
    	{ 0x5e29, 0x01 }, { 0x5e2a, 0x00 }, { 0x5e2c, 0x01 }, { 0x5e2d, 0x00 },
    	{ 0x5e2f, 0x01 }, { 0x5e30, 0x00 }, { 0x5e32, 0x00 }, { 0x5e33, 0x80 },
    	{ 0x5e34, 0x00 }, { 0x5e35, 0x00 }, { 0x5e36, 0x80 }, { 0x5e37, 0x00 },
    	{ 0x5e38, 0x00 }, { 0x5e39, 0x80 }, { 0x5e3a, 0x00 }, { 0x5e3b, 0x00 },
    	{ 0x5e3c, 0x80 }, { 0x5e3d, 0x00 }, { 0x5e3e, 0x00 }, { 0x5e3f, 0x80 },
    	{ 0x5e40, 0x00 }, { 0x5e41, 0x00 }, { 0x5e42, 0x80 }, { 0x5e43, 0x00 },
    	{ 0x5e44, 0x00 }, { 0x5e45, 0x80 }, { 0x5e46, 0x00 }, { 0x5e47, 0x00 },
    	{ 0x5e48, 0x80 }, { 0x5e49, 0x00 }, { 0x5e4a, 0x00 }, { 0x5e4b, 0x80 },
    	{ 0x5e4c, 0x00 }, { 0x5e4d, 0x00 }, { 0x5e4e, 0x80 }, { 0x5e50, 0x00 },
    	{ 0x5e51, 0x80 }, { 0x5e53, 0x00 }, { 0x5e54, 0x80 }, { 0x5e56, 0x00 },
    	{ 0x5e57, 0x40 }, { 0x5e59, 0x00 }, { 0x5e5a, 0x40 }, { 0x5e5c, 0x00 },
    	{ 0x5e5d, 0x40 }, { 0x5e5f, 0x00 }, { 0x5e60, 0x40 }, { 0x5e62, 0x00 },
    	{ 0x5e63, 0x40 }, { 0x5e65, 0x00 }, { 0x5e66, 0x40 }, { 0x5e68, 0x00 },
    	{ 0x5e69, 0x40 }, { 0x5e6b, 0x00 }, { 0x5e6c, 0x40 }, { 0x5e6e, 0x00 },
    	{ 0x5e6f, 0x40 }, { 0x5e71, 0x00 }, { 0x5e72, 0x40 }, { 0x5e74, 0x00 },
    	{ 0x5e75, 0x40 }, { 0x5e77, 0x00 }, { 0x5e78, 0x40 }, { 0x5e7a, 0x00 },
    	{ 0x5e7b, 0x40 }, { 0x5e7d, 0x00 }, { 0x5e7e, 0x40 }, { 0x5e80, 0x00 },
    	{ 0x5e81, 0x40 }, { 0x5e83, 0x00 }, { 0x5e84, 0x40 }, { 0x5f00, 0x02 },
    	{ 0x5f01, 0x08 }, { 0x5f02, 0x09 }, { 0x5f03, 0x0a }, { 0x5f04, 0x0b },
    	{ 0x5f05, 0x0c }, { 0x5f06, 0x0c }, { 0x5f07, 0x0c }, { 0x5f08, 0x0c },
    	{ 0x5f09, 0x0c }, { 0x5f0a, 0x0d }, { 0x5f0b, 0x0d }, { 0x5f0c, 0x0d },
    	{ 0x5f0d, 0x0d }, { 0x5f0e, 0x0d }, { 0x5f0f, 0x0e }, { 0x5f10, 0x0e },
    	{ 0x5f11, 0x0e }, { 0x5f12, 0x0e }, { 0x5f13, 0x0f }, { 0x5f14, 0x0f },
    	{ 0x5f15, 0x10 }, { 0x5f16, 0x11 }, { 0x5f17, 0x11 }, { 0x5f18, 0x12 },
    	{ 0x5f19, 0x12 }, { 0x5f1a, 0x13 }, { 0x5f1b, 0x13 }, { 0x5f1c, 0x14 },
    	{ 0x5f1d, 0x14 }, { 0x5f1e, 0x16 }, { 0x5f1f, 0x16 }, { 0x5f20, 0x16 },
    	{ 0x5f21, 0x08 }, { 0x5f22, 0x00 }, { 0x5f23, 0x01 }, { 0x5f26, 0x02 },
    	{ 0x5f27, 0x00 }, { 0x5f29, 0x02 }, { 0x5f2a, 0x00 }, { 0x5f2c, 0x02 },
    	{ 0x5f2d, 0x00 }, { 0x5f2f, 0x02 }, { 0x5f30, 0x00 }, { 0x5f32, 0x02 },
    	{ 0x5f33, 0x00 }, { 0x5f34, 0x00 }, { 0x5f35, 0x02 }, { 0x5f36, 0x00 },
    	{ 0x5f37, 0x00 }, { 0x5f38, 0x02 }, { 0x5f39, 0x00 }, { 0x5f3a, 0x00 },
    	{ 0x5f3b, 0x02 }, { 0x5f3c, 0x00 }, { 0x5f3d, 0x00 }, { 0x5f3e, 0x02 },
    	{ 0x5f3f, 0x00 }, { 0x5f40, 0x00 }, { 0x5f41, 0x02 }, { 0x5f42, 0x00 },
    	{ 0x5f43, 0x00 }, { 0x5f44, 0x02 }, { 0x5f45, 0x00 }, { 0x5f46, 0x00 },
    	{ 0x5f47, 0x04 }, { 0x5f48, 0x00 }, { 0x5f49, 0x00 }, { 0x5f4a, 0x04 },
    	{ 0x5f4b, 0x00 }, { 0x5f4c, 0x00 }, { 0x5f4d, 0x04 }, { 0x5f4e, 0x00 },
    	{ 0x5f50, 0x04 }, { 0x5f51, 0x00 }, { 0x5f53, 0x04 }, { 0x5f54, 0x00 },
    	{ 0x5f56, 0x04 }, { 0x5f57, 0x00 }, { 0x5f59, 0x04 }, { 0x5f5a, 0x00 },
    	{ 0x5f5c, 0x04 }, { 0x5f5d, 0x00 }, { 0x5f5f, 0x08 }, { 0x5f60, 0x00 },
    	{ 0x5f62, 0x08 }, { 0x5f63, 0x00 }, { 0x5f65, 0x08 }, { 0x5f66, 0x00 },
    	{ 0x5f68, 0x08 }, { 0x5f69, 0x00 }, { 0x5f6b, 0x08 }, { 0x5f6c, 0x00 },
    	{ 0x5f6e, 0x10 }, { 0x5f6f, 0x00 }, { 0x5f71, 0x10 }, { 0x5f72, 0x00 },
    	{ 0x5f74, 0x10 }, { 0x5f75, 0x00 }, { 0x5f77, 0x10 }, { 0x5f78, 0x00 },
    	{ 0x5f7a, 0x20 }, { 0x5f7b, 0x00 }, { 0x5f7d, 0x20 }, { 0x5f7e, 0x00 },
    	{ 0x5f80, 0x20 }, { 0x5f81, 0x00 }, { 0x5f83, 0x00 }, { 0x5f84, 0xff },
    	{ 0x5240, 0x0f }, { 0x5243, 0x00 }, { 0x5244, 0x00 }, { 0x5245, 0x00 },
    	{ 0x5246, 0x00 }, { 0x5247, 0x00 }, { 0x5248, 0x00 }, { 0x5249, 0x00 },
    	{ 0x5440, 0x0f }, { 0x5443, 0x00 }, { 0x5445, 0x00 }, { 0x5447, 0x00 },
    	{ 0x5448, 0x00 }, { 0x5449, 0x00 }, { 0x5640, 0x0f }, { 0x5642, 0x00 },
    	{ 0x5643, 0x00 }, { 0x5644, 0x00 }, { 0x5645, 0x00 }, { 0x5646, 0x00 },
    	{ 0x5647, 0x00 }, { 0x5649, 0x00 }, { 0x5840, 0x0f }, { 0x5842, 0x00 },
    	{ 0x5843, 0x00 }, { 0x5845, 0x00 }, { 0x5846, 0x00 }, { 0x5847, 0x00 },
    	{ 0x5848, 0x00 }, { 0x5849, 0x00 }, { 0x4001, 0x2b }, { 0x4008, 0x02 },
    	{ 0x4009, 0x03 }, { 0x4018, 0x12 }, { 0x4022, 0x40 }, { 0x4023, 0x20 },
    	{ 0x4026, 0x00 }, { 0x4027, 0x40 }, { 0x4028, 0x00 }, { 0x4029, 0x40 },
    	{ 0x402a, 0x00 }, { 0x402b, 0x40 }, { 0x402c, 0x00 }, { 0x402d, 0x40 },
    	{ 0x405e, 0x00 }, { 0x405f, 0x00 }, { 0x4060, 0x00 }, { 0x4061, 0x00 },
    	{ 0x4062, 0x00 }, { 0x4063, 0x00 }, { 0x4064, 0x00 }, { 0x4065, 0x00 },
    	{ 0x4066, 0x00 }, { 0x4067, 0x00 }, { 0x4068, 0x00 }, { 0x4069, 0x00 },
    	{ 0x406a, 0x00 }, { 0x406b, 0x00 }, { 0x406c, 0x00 }, { 0x406d, 0x00 },
    	{ 0x406e, 0x00 }, { 0x406f, 0x00 }, { 0x4070, 0x00 }, { 0x4071, 0x00 },
    	{ 0x4072, 0x00 }, { 0x4073, 0x00 }, { 0x4074, 0x00 }, { 0x4075, 0x00 },
    	{ 0x4076, 0x00 }, { 0x4077, 0x00 }, { 0x4078, 0x00 }, { 0x4079, 0x00 },
    	{ 0x407a, 0x00 }, { 0x407b, 0x00 }, { 0x407c, 0x00 }, { 0x407d, 0x00 },
    	{ 0x407e, 0xcc }, { 0x407f, 0x18 }, { 0x4080, 0xff }, { 0x4081, 0xff },
    	{ 0x4082, 0x01 }, { 0x4083, 0x53 }, { 0x4084, 0x01 }, { 0x4085, 0x2b },
    	{ 0x4086, 0x00 }, { 0x4087, 0xb3 }, { 0x4640, 0x40 }, { 0x4641, 0x11 },
    	{ 0x4642, 0x0e }, { 0x4643, 0xee }, { 0x4646, 0x0f }, { 0x4648, 0x00 },
    	{ 0x4649, 0x03 }, { 0x4d09, 0xff }, { 0x4d09, 0xdf }, { 0x5019, 0x00 },
    	{ 0x501a, 0xff }, { 0x501b, 0xff }, { 0x501d, 0x00 }, { 0x501e, 0x23 },
    	{ 0x501f, 0x8e }, { 0x5021, 0x00 }, { 0x5022, 0x00 }, { 0x5023, 0x50 },
    	{ 0x5025, 0x00 }, { 0x5026, 0x23 }, { 0x5027, 0x8e }, { 0x5003, 0x7a },
    	{ 0x5b80, 0x08 }, { 0x5c00, 0x08 }, { 0x5c80, 0x00 }, { 0x5bbe, 0x12 },
    	{ 0x5c3e, 0x12 }, { 0x5cbe, 0x12 }, { 0x5b8a, 0x80 }, { 0x5b8b, 0x80 },
    	{ 0x5b8c, 0x80 }, { 0x5b8d, 0x80 }, { 0x5b8e, 0x80 }, { 0x5b8f, 0x40 },
    	{ 0x5b90, 0x80 }, { 0x5b91, 0x80 }, { 0x5b92, 0x80 }, { 0x5b93, 0x60 },
    	{ 0x5b94, 0x00 }, { 0x5b95, 0x00 }, { 0x5b96, 0x40 }, { 0x5b97, 0x80 },
    	{ 0x5b98, 0x10 }, { 0x5b99, 0x00 }, { 0x5b9a, 0x00 }, { 0x5b9b, 0x00 },
    	{ 0x5b9c, 0x00 }, { 0x5b9d, 0x00 }, { 0x5b9e, 0x00 }, { 0x5b9f, 0x00 },
    	{ 0x5ba0, 0x00 }, { 0x5ba1, 0x00 }, { 0x5ba2, 0x00 }, { 0x5ba3, 0x00 },
    	{ 0x5ba4, 0x00 }, { 0x5ba5, 0x00 }, { 0x5ba6, 0x00 }, { 0x5ba7, 0x00 },
    	{ 0x5ba8, 0x00 }, { 0x5ba9, 0xc0 }, { 0x5baa, 0x01 }, { 0x5bab, 0x40 },
    	{ 0x5bac, 0x02 }, { 0x5bad, 0x40 }, { 0x5bae, 0x00 }, { 0x5baf, 0x50 },
    	{ 0x5bb0, 0x00 }, { 0x5bb1, 0x60 }, { 0x5bb2, 0x00 }, { 0x5bb3, 0xc0 },
    	{ 0x5c0a, 0x80 }, { 0x5c0b, 0x80 }, { 0x5c0c, 0x80 }, { 0x5c0d, 0x80 },
    	{ 0x5c0e, 0x60 }, { 0x5c0f, 0x80 }, { 0x5c10, 0x80 }, { 0x5c11, 0x80 },
    	{ 0x5c12, 0x60 }, { 0x5c13, 0x20 }, { 0x5c14, 0x80 }, { 0x5c15, 0x80 },
    	{ 0x5c16, 0x80 }, { 0x5c17, 0x20 }, { 0x5c18, 0x00 }, { 0x5c19, 0x80 },
    	{ 0x5c1a, 0x40 }, { 0x5c1b, 0x20 }, { 0x5c1c, 0x00 }, { 0x5c1d, 0x00 },
    	{ 0x5c1e, 0x80 }, { 0x5c1f, 0x00 }, { 0x5c20, 0x00 }, { 0x5c21, 0x00 },
    	{ 0x5c22, 0x00 }, { 0x5c23, 0x00 }, { 0x5c24, 0x00 }, { 0x5c25, 0x00 },
    	{ 0x5c26, 0x00 }, { 0x5c27, 0x00 }, { 0x5c28, 0x02 }, { 0x5c29, 0x00 },
    	{ 0x5c2a, 0x02 }, { 0x5c2b, 0x76 }, { 0x5c2c, 0x03 }, { 0x5c2d, 0x08 },
    	{ 0x5c2e, 0x00 }, { 0x5c2f, 0x80 }, { 0x5c30, 0x01 }, { 0x5c31, 0x00 },
    	{ 0x5c32, 0x02 }, { 0x5c33, 0x00 }, { 0x5c8a, 0x80 }, { 0x5c8b, 0x80 },
    	{ 0x5c8c, 0x80 }, { 0x5c8d, 0x80 }, { 0x5c8e, 0x80 }, { 0x5c8f, 0x80 },
    	{ 0x5c90, 0x80 }, { 0x5c91, 0x80 }, { 0x5c92, 0x80 }, { 0x5c93, 0x60 },
    	{ 0x5c94, 0x80 }, { 0x5c95, 0x80 }, { 0x5c96, 0x80 }, { 0x5c97, 0x60 },
    	{ 0x5c98, 0x40 }, { 0x5c99, 0x80 }, { 0x5c9a, 0x80 }, { 0x5c9b, 0x80 },
    	{ 0x5c9c, 0x40 }, { 0x5c9d, 0x20 }, { 0x5c9e, 0x80 }, { 0x5c9f, 0x80 },
    	{ 0x5ca0, 0x80 }, { 0x5ca1, 0x20 }, { 0x5ca2, 0x00 }, { 0x5ca3, 0x80 },
    	{ 0x5ca4, 0x80 }, { 0x5ca5, 0x80 }, { 0x5ca6, 0x00 }, { 0x5ca7, 0x00 },
    	{ 0x5ca8, 0x01 }, { 0x5ca9, 0x00 }, { 0x5caa, 0x02 }, { 0x5cab, 0x00 },
    	{ 0x5cac, 0x03 }, { 0x5cad, 0x08 }, { 0x5cae, 0x01 }, { 0x5caf, 0x00 },
    	{ 0x5cb0, 0x02 }, { 0x5cb1, 0x00 }, { 0x5cb2, 0x03 }, { 0x5cb3, 0x08 },
    	{ 0x5be7, 0x80 }, { 0x5bc9, 0x80 }, { 0x5bca, 0x80 }, { 0x5bcb, 0x80 },
    	{ 0x5bcc, 0x80 }, { 0x5bcd, 0x80 }, { 0x5bce, 0x80 }, { 0x5bcf, 0x80 },
    	{ 0x5bd0, 0x80 }, { 0x5bd1, 0x80 }, { 0x5bd2, 0x20 }, { 0x5bd3, 0x80 },
    	{ 0x5bd4, 0x40 }, { 0x5bd5, 0x20 }, { 0x5bd6, 0x00 }, { 0x5bd7, 0x00 },
    	{ 0x5bd8, 0x00 }, { 0x5bd9, 0x00 }, { 0x5bda, 0x00 }, { 0x5bdb, 0x00 },
    	{ 0x5bdc, 0x00 }, { 0x5bdd, 0x00 }, { 0x5bde, 0x00 }, { 0x5bdf, 0x00 },
    	{ 0x5be0, 0x00 }, { 0x5be1, 0x00 }, { 0x5be2, 0x00 }, { 0x5be3, 0x00 },
    	{ 0x5be4, 0x00 }, { 0x5be5, 0x00 }, { 0x5be6, 0x00 }, { 0x5c49, 0x80 },
    	{ 0x5c4a, 0x80 }, { 0x5c4b, 0x80 }, { 0x5c4c, 0x80 }, { 0x5c4d, 0x40 },
    	{ 0x5c4e, 0x80 }, { 0x5c4f, 0x80 }, { 0x5c50, 0x80 }, { 0x5c51, 0x60 },
    	{ 0x5c52, 0x20 }, { 0x5c53, 0x80 }, { 0x5c54, 0x80 }, { 0x5c55, 0x80 },
    	{ 0x5c56, 0x20 }, { 0x5c57, 0x00 }, { 0x5c58, 0x80 }, { 0x5c59, 0x40 },
    	{ 0x5c5a, 0x20 }, { 0x5c5b, 0x00 }, { 0x5c5c, 0x00 }, { 0x5c5d, 0x80 },
    	{ 0x5c5e, 0x00 }, { 0x5c5f, 0x00 }, { 0x5c60, 0x00 }, { 0x5c61, 0x00 },
    	{ 0x5c62, 0x00 }, { 0x5c63, 0x00 }, { 0x5c64, 0x00 }, { 0x5c65, 0x00 },
    	{ 0x5c66, 0x00 }, { 0x5cc9, 0x80 }, { 0x5cca, 0x80 }, { 0x5ccb, 0x80 },
    	{ 0x5ccc, 0x80 }, { 0x5ccd, 0x80 }, { 0x5cce, 0x80 }, { 0x5ccf, 0x80 },
    	{ 0x5cd0, 0x80 }, { 0x5cd1, 0x80 }, { 0x5cd2, 0x60 }, { 0x5cd3, 0x80 },
    	{ 0x5cd4, 0x80 }, { 0x5cd5, 0x80 }, { 0x5cd6, 0x60 }, { 0x5cd7, 0x40 },
    	{ 0x5cd8, 0x80 }, { 0x5cd9, 0x80 }, { 0x5cda, 0x80 }, { 0x5cdb, 0x40 },
    	{ 0x5cdc, 0x20 }, { 0x5cdd, 0x80 }, { 0x5cde, 0x80 }, { 0x5cdf, 0x80 },
    	{ 0x5ce0, 0x20 }, { 0x5ce1, 0x00 }, { 0x5ce2, 0x80 }, { 0x5ce3, 0x80 },
    	{ 0x5ce4, 0x80 }, { 0x5ce5, 0x00 }, { 0x5ce6, 0x00 }, { 0x5b84, 0x02 },
    	{ 0x5b85, 0xcc }, { 0x5bb4, 0x05 }, { 0x5bb5, 0xc6 }, { 0x5c04, 0x02 },
    	{ 0x5c05, 0xcc }, { 0x5c34, 0x05 }, { 0x5c35, 0x33 }, { 0x5c84, 0x02 },
    	{ 0x5c85, 0xcc }, { 0x5cb4, 0x05 }, { 0x5cb5, 0x33 }, { 0x5bbf, 0x00 },
    	{ 0x5bc0, 0x04 }, { 0x5bc1, 0x06 }, { 0x5bc2, 0xff }, { 0x5bc3, 0x00 },
    	{ 0x5bc4, 0x04 }, { 0x5bc5, 0x02 }, { 0x5bc6, 0xb8 }, { 0x5c3f, 0x00 },
    	{ 0x5c40, 0x04 }, { 0x5c41, 0x07 }, { 0x5c42, 0xff }, { 0x5c43, 0x00 },
    	{ 0x5c44, 0x04 }, { 0x5c45, 0x03 }, { 0x5c46, 0xb8 }, { 0x5cbf, 0x00 },
    	{ 0x5cc0, 0x20 }, { 0x5cc1, 0x07 }, { 0x5cc2, 0xff }, { 0x5cc3, 0x00 },
    	{ 0x5cc4, 0x20 }, { 0x5cc5, 0x03 }, { 0x5cc6, 0x00 }, { 0x5b86, 0x05 },
    	{ 0x5c06, 0x05 }, { 0x5c86, 0x05 }, { 0x5bb8, 0x01 }, { 0x5bb9, 0x01 },
    	{ 0x5c38, 0x01 }, { 0x5c39, 0x01 }, { 0x5cb8, 0x01 }, { 0x5cb9, 0x01 },
    	{ 0x5bc7, 0x00 }, { 0x5bc8, 0x80 }, { 0x5c47, 0x00 }, { 0x5c48, 0x80 },
    	{ 0x5cc7, 0x00 }, { 0x5cc8, 0x80 }, { 0x5bba, 0x01 }, { 0x5bbb, 0x00 },
    	{ 0x5c3a, 0x01 }, { 0x5c3b, 0x00 }, { 0x5cba, 0x01 }, { 0x5cbb, 0x00 },
    	{ 0x5d74, 0x01 }, { 0x5d75, 0x00 }, { 0x5d1f, 0x81 }, { 0x5d11, 0x00 },
    	{ 0x5d12, 0x10 }, { 0x5d13, 0x10 }, { 0x5d15, 0x05 }, { 0x5d16, 0x05 },
    	{ 0x5d17, 0x05 }, { 0x5d08, 0x03 }, { 0x5d09, 0x6b }, { 0x5d0a, 0x03 },
    	{ 0x5d0b, 0x6b }, { 0x5d18, 0x03 }, { 0x5d19, 0x6b }, { 0x5b40, 0x01 },
    	{ 0x5b41, 0x00 }, { 0x5b42, 0x00 }, { 0x5b43, 0x00 }, { 0x5b44, 0x00 },
    	{ 0x5b45, 0x00 }, { 0x5b46, 0x00 }, { 0x5b47, 0x00 }, { 0x5b48, 0x01 },
    	{ 0x5b49, 0x00 }, { 0x5b4a, 0x00 }, { 0x5b4b, 0x00 }, { 0x5b4c, 0x00 },
    	{ 0x5b4d, 0x00 }, { 0x5b4e, 0x00 }, { 0x5b4f, 0x00 }, { 0x5b50, 0x01 },
    	{ 0x5b51, 0x00 }, { 0x5b52, 0x01 }, { 0x5b53, 0x00 }, { 0x5b54, 0x00 },
    	{ 0x5b55, 0x00 }, { 0x5b56, 0x00 }, { 0x5b57, 0x00 }, { 0x5b58, 0x00 },
    	{ 0x5b59, 0x00 }, { 0x5b5a, 0x01 }, { 0x5b5b, 0x00 }, { 0x5b5c, 0x00 },
    	{ 0x5b5d, 0x00 }, { 0x5b5e, 0x00 }, { 0x5b5f, 0x00 }, { 0x5b60, 0x00 },
    	{ 0x5b61, 0x00 }, { 0x5b62, 0x01 }, { 0x5b63, 0x00 }, { 0x5b64, 0x01 },
    	{ 0x5b65, 0x00 }, { 0x5b66, 0x00 }, { 0x5b67, 0x00 }, { 0x5b68, 0x00 },
    	{ 0x5b69, 0x00 }, { 0x5b6a, 0x00 }, { 0x5b6b, 0x00 }, { 0x5b6c, 0x01 },
    	{ 0x5b6d, 0x00 }, { 0x5b6e, 0x00 }, { 0x5b6f, 0x00 }, { 0x5b70, 0x00 },
    	{ 0x5b71, 0x00 }, { 0x5b72, 0x00 }, { 0x5b73, 0x00 }, { 0x5b74, 0x01 },
    	{ 0x5b75, 0x00 }, { 0x5b78, 0x00 }, { 0x5b79, 0x4c }, { 0x5b7a, 0x00 },
    	{ 0x5b7b, 0xb9 }, { 0x5b7c, 0x01 }, { 0x5b7d, 0x38 }, { 0x5b7e, 0x01 },
    	{ 0x5280, 0x04 }, { 0x5281, 0x00 }, { 0x5282, 0x04 }, { 0x5283, 0x00 },
    	{ 0x5284, 0x04 }, { 0x5285, 0x00 }, { 0x5286, 0x04 }, { 0x5287, 0x00 },
    	{ 0x5480, 0x04 }, { 0x5481, 0x00 }, { 0x5482, 0x04 }, { 0x5483, 0x00 },
    	{ 0x5484, 0x04 }, { 0x5485, 0x00 }, { 0x5486, 0x04 }, { 0x5487, 0x00 },
    	{ 0x5680, 0x04 }, { 0x5681, 0x00 }, { 0x5682, 0x04 }, { 0x5683, 0x00 },
    	{ 0x5684, 0x04 }, { 0x5685, 0x00 }, { 0x5686, 0x04 }, { 0x5687, 0x00 },
    	{ 0x5880, 0x04 }, { 0x5881, 0x00 }, { 0x5882, 0x04 }, { 0x5883, 0x00 },
    	{ 0x5884, 0x04 }, { 0x5885, 0x00 }, { 0x5886, 0x04 }, { 0x5887, 0x00 },
    	{ 0x52c6, 0x00 }, { 0x52c7, 0x12 }, { 0x52c8, 0x04 }, { 0x52c9, 0x02 },
    	{ 0x52ca, 0x01 }, { 0x52cb, 0x01 }, { 0x52cc, 0x04 }, { 0x52cd, 0x02 },
    	{ 0x52ce, 0x01 }, { 0x52cf, 0x01 }, { 0x52d0, 0x03 }, { 0x52d1, 0x08 },
    	{ 0x52d2, 0x0c }, { 0x54c6, 0x00 }, { 0x54c7, 0x12 }, { 0x54c8, 0x04 },
    	{ 0x54c9, 0x02 }, { 0x54ca, 0x01 }, { 0x54cb, 0x01 }, { 0x54cc, 0x04 },
    	{ 0x54cd, 0x02 }, { 0x54ce, 0x01 }, { 0x54cf, 0x01 }, { 0x54d0, 0x03 },
    	{ 0x54d1, 0x08 }, { 0x54d2, 0x0c }, { 0x56c6, 0x00 }, { 0x56c7, 0x12 },
    	{ 0x56c8, 0x04 }, { 0x56c9, 0x02 }, { 0x56ca, 0x01 }, { 0x56cb, 0x01 },
    	{ 0x56cc, 0x04 }, { 0x56cd, 0x02 }, { 0x56ce, 0x01 }, { 0x56cf, 0x01 },
    	{ 0x56d0, 0x03 }, { 0x56d1, 0x08 }, { 0x56d2, 0x0c }, { 0x58c6, 0x00 },
    	{ 0x58c7, 0x12 }, { 0x58c8, 0x04 }, { 0x58c9, 0x02 }, { 0x58ca, 0x01 },
    	{ 0x58cb, 0x01 }, { 0x58cc, 0x04 }, { 0x58cd, 0x02 }, { 0x58ce, 0x01 },
    	{ 0x58cf, 0x01 }, { 0x58d0, 0x03 }, { 0x58d1, 0x08 }, { 0x58d2, 0x0c },
    	{ 0x5004, 0x1e }, { 0x610a, 0x07 }, { 0x610b, 0x80 }, { 0x610c, 0x05 },
    	{ 0x610d, 0x00 }, { 0x6102, 0x3f }, { 0x6120, 0x75 }, { 0x6121, 0x75 },
    	{ 0x6122, 0x75 }, { 0x6123, 0x75 }, { 0x6124, 0x75 }, { 0x6125, 0x75 },
    	{ 0x6126, 0x75 }, { 0x6127, 0x75 }, { 0x6128, 0x75 }, { 0x6129, 0x75 },
    	{ 0x612a, 0x75 }, { 0x612b, 0x75 }, { 0x612c, 0x75 }, { 0x612d, 0x75 },
    	{ 0x612e, 0x75 }, { 0x612f, 0x75 }, { 0x6130, 0x75 }, { 0x6131, 0x75 },
    	{ 0x6132, 0x75 }, { 0x6133, 0x75 }, { 0x6134, 0x75 }, { 0x6135, 0x75 },
    	{ 0x6136, 0x75 }, { 0x6137, 0x75 }, { 0x6138, 0x75 }, { 0x6139, 0x75 },
    	{ 0x613a, 0x75 }, { 0x613b, 0x75 }, { 0x613c, 0x75 }, { 0x613d, 0x75 },
    	{ 0x613e, 0x75 }, { 0x613f, 0x75 }, { 0x6140, 0x75 }, { 0x6141, 0x75 },
    	{ 0x6142, 0x75 }, { 0x6143, 0x75 }, { 0x6144, 0x75 }, { 0x6145, 0x75 },
    	{ 0x6146, 0x75 }, { 0x6147, 0x75 }, { 0x6148, 0x75 }, { 0x6149, 0x75 },
    	{ 0x614a, 0x75 }, { 0x614b, 0x75 }, { 0x614c, 0x75 }, { 0x614d, 0x75 },
    	{ 0x614e, 0x75 }, { 0x614f, 0x75 }, { 0x6150, 0x75 }, { 0x6151, 0x75 },
    	{ 0x6152, 0x75 }, { 0x6153, 0x75 }, { 0x6154, 0x75 }, { 0x6155, 0x75 },
    	{ 0x6156, 0x75 }, { 0x6157, 0x75 }, { 0x6158, 0x75 }, { 0x6159, 0x75 },
    	{ 0x615a, 0x75 }, { 0x615b, 0x75 }, { 0x615c, 0x75 }, { 0x615d, 0x75 },
    	{ 0x615e, 0x75 }, { 0x615f, 0x75 }, { 0x6160, 0x75 }, { 0x6161, 0x75 },
    	{ 0x6162, 0x75 }, { 0x6163, 0x75 }, { 0x6164, 0x75 }, { 0x6165, 0x75 },
    	{ 0x6166, 0x75 }, { 0x6167, 0x75 }, { 0x6168, 0x75 }, { 0x6169, 0x75 },
    	{ 0x616a, 0x75 }, { 0x616b, 0x75 }, { 0x616c, 0x75 }, { 0x616d, 0x75 },
    	{ 0x616e, 0x75 }, { 0x616f, 0x75 }, { 0x6170, 0x75 }, { 0x6171, 0x75 },
    	{ 0x6172, 0x75 }, { 0x6173, 0x75 }, { 0x6174, 0x75 }, { 0x6175, 0x75 },
    	{ 0x6176, 0x75 }, { 0x6177, 0x75 }, { 0x6178, 0x75 }, { 0x6179, 0x75 },
    	{ 0x617a, 0x75 }, { 0x617b, 0x75 }, { 0x617c, 0x75 }, { 0x617d, 0x75 },
    	{ 0x617e, 0x75 }, { 0x617f, 0x75 }, { 0x6180, 0x75 }, { 0x6181, 0x75 },
    	{ 0x6182, 0x75 }, { 0x6183, 0x75 }, { 0x6184, 0x75 }, { 0x6185, 0x75 },
    	{ 0x6186, 0x75 }, { 0x6187, 0x75 }, { 0x6188, 0x75 }, { 0x6189, 0x75 },
    	{ 0x618a, 0x75 }, { 0x618b, 0x75 }, { 0x618c, 0x75 }, { 0x618d, 0x75 },
    	{ 0x618e, 0x75 }, { 0x618f, 0x75 }, { 0x6190, 0x75 }, { 0x6191, 0x75 },
    	{ 0x6192, 0x75 }, { 0x6193, 0x75 }, { 0x6194, 0x75 }, { 0x6195, 0x75 },
    	{ 0x6196, 0x75 }, { 0x6197, 0x75 }, { 0x6198, 0x75 }, { 0x6199, 0x75 },
    	{ 0x619a, 0x75 }, { 0x619b, 0x75 }, { 0x619c, 0x75 }, { 0x619d, 0x75 },
    	{ 0x619e, 0x75 }, { 0x619f, 0x75 }, { 0x61a0, 0x75 }, { 0x61a1, 0x75 },
    	{ 0x61a2, 0x75 }, { 0x61a3, 0x75 }, { 0x61a4, 0x75 }, { 0x61a5, 0x75 },
    	{ 0x61a6, 0x75 }, { 0x61a7, 0x75 }, { 0x61a8, 0x75 }, { 0x61a9, 0x75 },
    	{ 0x61aa, 0x75 }, { 0x61ab, 0x75 }, { 0x61ac, 0x75 }, { 0x61ad, 0x75 },
    	{ 0x61ae, 0x75 }, { 0x61af, 0x75 }, { 0x5d62, 0x07 }, { 0x5d40, 0x02 },
    	{ 0x5d41, 0x01 }, { 0x5d63, 0x08 }, { 0x5d64, 0x01 }, { 0x5d65, 0xff },
    	{ 0x5d56, 0x00 }, { 0x5d57, 0x20 }, { 0x5d58, 0x00 }, { 0x5d59, 0x20 },
    	{ 0x5d5a, 0x00 }, { 0x5d5b, 0x0c }, { 0x5d5c, 0x02 }, { 0x5d5d, 0x40 },
    	{ 0x5d5e, 0x02 }, { 0x5d5f, 0x40 }, { 0x5d60, 0x03 }, { 0x5d61, 0x40 },
    	{ 0x5d4a, 0x02 }, { 0x5d4b, 0x40 }, { 0x5d4c, 0x02 }, { 0x5d4d, 0x40 },
    	{ 0x5d4e, 0x02 }, { 0x5d4f, 0x40 }, { 0x5d50, 0x18 }, { 0x5d51, 0x80 },
    	{ 0x5d52, 0x18 }, { 0x5d53, 0x80 }, { 0x5d54, 0x18 }, { 0x5d55, 0x80 },
    	{ 0x5d46, 0x20 }, { 0x5d47, 0x00 }, { 0x5d48, 0x22 }, { 0x5d49, 0x00 },
    	{ 0x5d42, 0x20 }, { 0x5d43, 0x00 }, { 0x5d44, 0x22 }, { 0x5d45, 0x00 },
    	{ 0x4221, 0x03 }, { 0x3501, 0x01 }, { 0x3502, 0x87 }, { 0x3541, 0x01 },
    	{ 0x3542, 0x87 }, { 0x35c1, 0x00 }, { 0x35c2, 0x00 }, { 0x420e, 0x66 },
    	{ 0x420f, 0x5d }, { 0x4210, 0xa8 }, { 0x4211, 0x55 }, { 0x507a, 0x5f },
    	{ 0x507b, 0x46 }, { 0x4f00, 0x00 }, { 0x4f01, 0x01 }, { 0x4f02, 0x80 },
    	{ 0x4f03, 0x2c }, { 0x4f04, 0xf8 }, { 0x5e00, 0x00 }, { 0x5e01, 0x00 },
    	{ 0x5e02, 0x09 }, { 0x5e03, 0x09 }, { 0x5e04, 0x0a }, { 0x5e05, 0x0a },
    	{ 0x5e06, 0x0a }, { 0x5e07, 0x0b }, { 0x5e08, 0x0b }, { 0x5e09, 0x0d },
    	{ 0x5e0a, 0x0d }, { 0x5e0b, 0x0d }, { 0x5e0c, 0x0e }, { 0x5e0d, 0x0e },
    	{ 0x5e0e, 0x0f }, { 0x5e0f, 0x0f }, { 0x5e10, 0x10 }, { 0x5e11, 0x10 },
    	{ 0x5e12, 0x11 }, { 0x5e13, 0x11 }, { 0x5e14, 0x12 }, { 0x5e15, 0x12 },
    	{ 0x5e16, 0x12 }, { 0x5e17, 0x12 }, { 0x5e18, 0x13 }, { 0x5e19, 0x13 },
    	{ 0x5e1a, 0x13 }, { 0x5e1b, 0x14 }, { 0x5e1c, 0x14 }, { 0x5e1d, 0x14 },
    	{ 0x5e1e, 0x15 }, { 0x5e1f, 0x15 }, { 0x5e20, 0x15 }, { 0x5e21, 0x16 },
    	{ 0x5e22, 0x00 }, { 0x5e23, 0x00 }, { 0x5e24, 0x00 }, { 0x5e25, 0x00 },
    	{ 0x5e26, 0x01 }, { 0x5e27, 0xff }, { 0x5e28, 0x00 }, { 0x5e29, 0x00 },
    	{ 0x5e2a, 0x80 }, { 0x5e2b, 0x00 }, { 0x5e2c, 0x00 }, { 0x5e2d, 0x40 },
    	{ 0x5e2e, 0x00 }, { 0x5e2f, 0x00 }, { 0x5e30, 0x40 }, { 0x5e31, 0x00 },
    	{ 0x5e32, 0x00 }, { 0x5e33, 0x40 }, { 0x5e34, 0x00 }, { 0x5e35, 0x00 },
    	{ 0x5e36, 0x40 }, { 0x5e37, 0x00 }, { 0x5e38, 0x00 }, { 0x5e39, 0x40 },
    	{ 0x5e3a, 0x00 }, { 0x5e3b, 0x00 }, { 0x5e3c, 0x40 }, { 0x5e3d, 0x00 },
    	{ 0x5e3e, 0x00 }, { 0x5e3f, 0x80 }, { 0x5e40, 0x00 }, { 0x5e41, 0x00 },
    	{ 0x5e42, 0x80 }, { 0x5e43, 0x00 }, { 0x5e44, 0x00 }, { 0x5e45, 0x80 },
    	{ 0x5e46, 0x00 }, { 0x5e47, 0x00 }, { 0x5e48, 0x80 }, { 0x5e49, 0x00 },
    	{ 0x5e4a, 0x00 }, { 0x5e4b, 0x80 }, { 0x5e4c, 0x00 }, { 0x5e4d, 0x00 },
    	{ 0x5e4e, 0x80 }, { 0x5e4f, 0x00 }, { 0x5e50, 0x00 }, { 0x5e51, 0x80 },
    	{ 0x5e52, 0x00 }, { 0x5e53, 0x00 }, { 0x5e54, 0x80 }, { 0x5e55, 0x00 },
    	{ 0x5e56, 0x00 }, { 0x5e57, 0x80 }, { 0x5e58, 0x00 }, { 0x5e59, 0x00 },
    	{ 0x5e5a, 0x80 }, { 0x5e5b, 0x00 }, { 0x5e5c, 0x00 }, { 0x5e5d, 0x80 },
    	{ 0x5e5e, 0x00 }, { 0x5e5f, 0x00 }, { 0x5e60, 0x80 }, { 0x5e61, 0x00 },
    	{ 0x5e62, 0x00 }, { 0x5e63, 0x80 }, { 0x5e64, 0x00 }, { 0x5e65, 0x00 },
    	{ 0x5e66, 0x80 }, { 0x5e67, 0x00 }, { 0x5e68, 0x00 }, { 0x5e69, 0x80 },
    	{ 0x5e6a, 0x00 }, { 0x5e6b, 0x00 }, { 0x5e6c, 0x80 }, { 0x5e6d, 0x00 },
    	{ 0x5e6e, 0x00 }, { 0x5e6f, 0x80 }, { 0x5e70, 0x00 }, { 0x5e71, 0x00 },
    	{ 0x5e72, 0x80 }, { 0x5e73, 0x00 }, { 0x5e74, 0x00 }, { 0x5e75, 0x80 },
    	{ 0x5e76, 0x00 }, { 0x5e77, 0x00 }, { 0x5e78, 0x80 }, { 0x5e79, 0x00 },
    	{ 0x5e7a, 0x00 }, { 0x5e7b, 0x80 }, { 0x5e7c, 0x00 }, { 0x5e7d, 0x00 },
    	{ 0x5e7e, 0x80 }, { 0x5e7f, 0x00 }, { 0x5e80, 0x00 }, { 0x5e81, 0x80 },
    	{ 0x5e82, 0x00 }, { 0x5e83, 0x00 }, { 0x5e84, 0x80 }, { 0x5b7e, 0x01 },
    	{ 0x5b7f, 0x02 }, { 0x5b78, 0x00 }, { 0x5b79, 0x62 }, { 0x5b7a, 0x00 },
    	{ 0x5b7b, 0xc4 }, { 0x5b7c, 0x01 }, { 0x5b7d, 0x76 }, { 0x5b40, 0x00 },
    	{ 0x5b41, 0xfb }, { 0x5b42, 0x00 }, { 0x5b43, 0x05 }, { 0x5b44, 0x00 },
    	{ 0x5b45, 0x00 }, { 0x5b46, 0x00 }, { 0x5b47, 0x01 }, { 0x5b48, 0x01 },
    	{ 0x5b49, 0x06 }, { 0x5b4a, 0x0f }, { 0x5b4b, 0xf9 }, { 0x5b4c, 0x0f },
    	{ 0x5b4d, 0xf5 }, { 0x5b4e, 0x00 }, { 0x5b4f, 0x0b }, { 0x5b50, 0x01 },
    	{ 0x5b51, 0x00 }, { 0x5b52, 0x01 }, { 0x5b53, 0x1f }, { 0x5b54, 0x0f },
    	{ 0x5b55, 0xed }, { 0x5b56, 0x0f }, { 0x5b57, 0xf4 }, { 0x5b58, 0x00 },
    	{ 0x5b59, 0x07 }, { 0x5b5a, 0x01 }, { 0x5b5b, 0x04 }, { 0x5b5c, 0x0f },
    	{ 0x5b5d, 0xf5 }, { 0x5b5e, 0x0f }, { 0x5b5f, 0xec }, { 0x5b60, 0x0f },
    	{ 0x5b61, 0xed }, { 0x5b62, 0x01 }, { 0x5b63, 0x27 }, { 0x5b64, 0x01 },
    	{ 0x5b65, 0x71 }, { 0x5b66, 0x0f }, { 0x5b67, 0xe6 }, { 0x5b68, 0x0f },
    	{ 0x5b69, 0xa9 }, { 0x5b6a, 0x0f }, { 0x5b6b, 0xfe }, { 0x5b6c, 0x01 },
    	{ 0x5b6d, 0x0a }, { 0x5b6e, 0x0f }, { 0x5b6f, 0xf8 }, { 0x5b70, 0x00 },
    	{ 0x5b71, 0x00 }, { 0x5b72, 0x00 }, { 0x5b73, 0x04 }, { 0x5b74, 0x00 },
    	{ 0x5b75, 0xfc }, { 0x500d, 0x03 },
    };
    
    struct ox02f10 {
    	struct device *dev;
    	struct clk *xclk;
    	struct gpio_desc *pwdn_gpio;
    	struct gpio_desc *reset_gpio;
    	struct gpio_desc *errb_gpio;//Muni
    	struct regmap *regmap;
    	struct v4l2_subdev sd;
    	struct media_pad pad;
    	struct v4l2_mbus_framefmt fmt;
    	struct v4l2_ctrl_handler ctrls;
    	struct v4l2_ctrl *exposure;
    	struct v4l2_ctrl *analogue_gain;
    	struct v4l2_mbus_config_mipi_csi2 bus;
    	/* Serializes controls, active format and streaming operations. */
    	struct mutex mutex;
    	bool streaming;
    };
    
    static int ox02f10_write_u16(struct ox02f10 *sensor,
    			     unsigned int reg, u16 value)
    {
    	u8 data[] = { value >> 8, value & 0xff };
    
    	return regmap_bulk_write(sensor->regmap, reg, data, sizeof(data));
    }
    
    static int ox02f10_set_exposure(struct ox02f10 *sensor, u32 exposure)
    {
    	return ox02f10_write_u16(sensor, OX02F10_REG_EXPOSURE, exposure);
    }
    
    static int ox02f10_set_analogue_gain(struct ox02f10 *sensor,
    				     u32 gain)
    {
    	return regmap_write(sensor->regmap,
    			    OX02F10_REG_ANALOG_GAIN,
    			    gain);
    }
    
    static inline struct ox02f10 *to_ox02f10(struct v4l2_subdev *sd)
    {
    	return container_of(sd, struct ox02f10, sd);
    }
    
    static int ox02f10_set_ctrl(struct v4l2_ctrl *ctrl)
    {
    	struct ox02f10 *sensor = container_of(ctrl->handler,
    					    struct ox02f10, ctrls);
    	int ret;
    
    	/* Cache controls while powered off; replay them before stream-on. */
    	ret = pm_runtime_get_if_in_use(sensor->dev);
    	if (ret <= 0)
    		return ret;
    
    	switch (ctrl->id) {
    	case V4L2_CID_EXPOSURE:
    		ret = ox02f10_set_exposure(sensor, ctrl->val);
    		break;
    	case V4L2_CID_ANALOGUE_GAIN:
    		ret = ox02f10_set_analogue_gain(sensor, ctrl->val);
    		break;
    	default:
    		ret = -EINVAL;
    	}
    
    	pm_runtime_put(sensor->dev);
    	return ret;
    }
    
    static int ox02f10_power_on(struct ox02f10 *sensor)
    {
    	int ret = clk_prepare_enable(sensor->xclk);
    	dev_info(sensor->dev, "DEBUG: power_on entry\n");//Muni
    
    	if (ret){
    		dev_err(sensor->dev,
    			"DEBUG: xclk enable failed: %d\n", ret);
    		return ret;
    	}
    	dev_info(sensor->dev, "DEBUG: xclk enabled, rate=%lu\n",
    		 clk_get_rate(sensor->xclk));
    	/* GPIO descriptor values are logical: 1 asserts, 0 deasserts. */
    	usleep_range(1000, 2000);
    	if (sensor->pwdn_gpio)
    	gpiod_set_value_cansleep(sensor->pwdn_gpio, 0);
    	if (sensor->reset_gpio)
    	gpiod_set_value_cansleep(sensor->reset_gpio, 0);
    	/* Allow startup even on modules without a controllable reset pin. */
    	msleep(30);
    	dev_info(sensor->dev, "DEBUG: power_on complete\n");
    	return 0;
    }
    
    static void ox02f10_power_off(struct ox02f10 *sensor)
    {
    	if (sensor->reset_gpio)
    	gpiod_set_value_cansleep(sensor->reset_gpio, 1);
    	if (sensor->pwdn_gpio)
    	gpiod_set_value_cansleep(sensor->pwdn_gpio, 1);
    	clk_disable_unprepare(sensor->xclk);
    }
    
    static int ox02f10_identify(struct ox02f10 *sensor)
    {
    	u8 id_bytes[2];
    	u16 id;
    	int ret;
    
    	ret = regmap_bulk_read(sensor->regmap, OX02F10_REG_CHIP_ID,
    			       id_bytes, sizeof(id_bytes));
    	if (ret)
    		return dev_err_probe(sensor->dev, ret, "failed to read chip ID\n");
    	id = (id_bytes[0] << 8) | id_bytes[1];
    	if (id != OX02F10_CHIP_ID) {
    		dev_err(sensor->dev, "unexpected chip ID 0x%04x\n", id);
    		return -ENODEV;
    	}
    	dev_info(sensor->dev, "detected OX02F10, chip ID 0x%04x\n", id);
    	return 0;
    }
    
    static void ox02f10_fill_format(struct v4l2_mbus_framefmt *fmt)
    {
    	fmt->width = OX02F10_WIDTH;
    	fmt->height = OX02F10_HEIGHT;
    	fmt->code = OX02F10_MEDIA_BUS_CODE;
    	fmt->field = V4L2_FIELD_NONE;
    	fmt->colorspace = V4L2_COLORSPACE_RAW;
    	fmt->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
    	fmt->quantization = V4L2_QUANTIZATION_FULL_RANGE;
    	fmt->xfer_func = V4L2_XFER_FUNC_NONE;
    }
    
    static int ox02f10_init_cfg(struct v4l2_subdev *sd,
    			    struct v4l2_subdev_state *state)
    {
    	if (!state)
    		return -EINVAL;
    
    	ox02f10_fill_format(v4l2_subdev_get_try_format(sd, state, 0));
    	return 0;
    }
    
    static int ox02f10_open(struct v4l2_subdev *sd,
    			struct v4l2_subdev_fh *fh)
    {
    	return ox02f10_init_cfg(sd, fh->state);
    }
    
    static int ox02f10_enum_mbus_code(struct v4l2_subdev *sd,
    				  struct v4l2_subdev_state *state,
    				  struct v4l2_subdev_mbus_code_enum *code)
    {
    	if (code->pad || code->index || code->stream)
    		return -EINVAL;
    	code->code = OX02F10_MEDIA_BUS_CODE;
    	return 0;
    }
    
    static int ox02f10_enum_frame_size(struct v4l2_subdev *sd,
    				   struct v4l2_subdev_state *state,
    				   struct v4l2_subdev_frame_size_enum *fse)
    {
    	if (fse->pad || fse->index || fse->stream ||
    	    fse->code != OX02F10_MEDIA_BUS_CODE)
    		return -EINVAL;
    	fse->min_width = fse->max_width = OX02F10_WIDTH;
    	fse->min_height = fse->max_height = OX02F10_HEIGHT;
    	return 0;
    }
    
    static int ox02f10_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
    				  struct v4l2_mbus_frame_desc *fd)
    {
    	if (pad)
    		return -EINVAL;
    
    	memset(fd, 0, sizeof(*fd));
    	fd->type = V4L2_MBUS_FRAME_DESC_TYPE_CSI2;
    	fd->num_entries = 1;
    	fd->entry[0].stream = 0;
    	fd->entry[0].flags = V4L2_MBUS_FRAME_DESC_FL_LEN_MAX;
    	fd->entry[0].length = OX02F10_WIDTH * OX02F10_HEIGHT *
    			      OX02F10_BITS_PER_PIXEL / 8;
    	fd->entry[0].pixelcode = OX02F10_MEDIA_BUS_CODE;
    	fd->entry[0].bus.csi2.vc = 0;
    	fd->entry[0].bus.csi2.dt = 0x2c; /* RAW12 */ //Muni
    
    	return 0;
    }
    
    static int ox02f10_set_fmt(struct v4l2_subdev *sd,
    			   struct v4l2_subdev_state *state,
    			   struct v4l2_subdev_format *fmt)
    {
    	struct ox02f10 *sensor = to_ox02f10(sd);
    	int ret = 0;
    
    	if (fmt->pad || fmt->stream ||
    	    (fmt->which != V4L2_SUBDEV_FORMAT_TRY &&
    	     fmt->which != V4L2_SUBDEV_FORMAT_ACTIVE) ||
    	    (fmt->which == V4L2_SUBDEV_FORMAT_TRY && !state))
    		return -EINVAL;
    
    	mutex_lock(&sensor->mutex);
    	if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE && sensor->streaming) {
    		ret = -EBUSY;
    		goto unlock;
    	}
    	ox02f10_fill_format(&fmt->format);
    	if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
    		*v4l2_subdev_get_try_format(sd, state, 0) = fmt->format;
    	else
    		sensor->fmt = fmt->format;
    unlock:
    	mutex_unlock(&sensor->mutex);
    	return ret;
    }
    
    static int ox02f10_get_fmt(struct v4l2_subdev *sd,
    			   struct v4l2_subdev_state *state,
    			   struct v4l2_subdev_format *fmt)
    {
    	struct ox02f10 *sensor = to_ox02f10(sd);
    
    	if (fmt->pad || fmt->stream ||
    	    (fmt->which != V4L2_SUBDEV_FORMAT_TRY &&
    	     fmt->which != V4L2_SUBDEV_FORMAT_ACTIVE) ||
    	    (fmt->which == V4L2_SUBDEV_FORMAT_TRY && !state))
    		return -EINVAL;
    
    	mutex_lock(&sensor->mutex);
    	if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
    		fmt->format = *v4l2_subdev_get_try_format(sd, state, 0);
    	else
    		fmt->format = sensor->fmt;
    	mutex_unlock(&sensor->mutex);
    	return 0;
    }
    
    static int ox02f10_get_selection(struct v4l2_subdev *sd,
    				 struct v4l2_subdev_state *state,
    				 struct v4l2_subdev_selection *sel)
    {
    	if (sel->pad || sel->stream ||
    	    (sel->which != V4L2_SUBDEV_FORMAT_TRY &&
    	     sel->which != V4L2_SUBDEV_FORMAT_ACTIVE))
    		return -EINVAL;
    
    	/* Only the fixed output window is described by the board mode. */
    	switch (sel->target) {
    	case V4L2_SEL_TGT_CROP:
    	case V4L2_SEL_TGT_CROP_DEFAULT:
    	case V4L2_SEL_TGT_CROP_BOUNDS:
    		sel->r = (struct v4l2_rect) {
    			.width = OX02F10_WIDTH,
    			.height = OX02F10_HEIGHT,
    		};
    		return 0;
    	default:
    		return -EINVAL;
    	}
    }
    
    static int ox02f10_get_frame_interval(struct v4l2_subdev *sd,
    				      struct v4l2_subdev_frame_interval *fi)
    {
    	if (fi->pad || fi->stream)
    		return -EINVAL;
    	fi->interval.numerator = 1;
    	fi->interval.denominator = OX02F10_FPS;
    	return 0;
    }
    
    static int ox02f10_enum_frame_interval(struct v4l2_subdev *sd,
    				      struct v4l2_subdev_state *state,
    				      struct v4l2_subdev_frame_interval_enum *fie)
    {
    	if (fie->pad || fie->stream || fie->index ||
    	    fie->code != OX02F10_MEDIA_BUS_CODE ||
    	    fie->width != OX02F10_WIDTH || fie->height != OX02F10_HEIGHT)
    		return -EINVAL;
    
    	fie->interval.numerator = 1;
    	fie->interval.denominator = OX02F10_FPS;
    	return 0;
    }
    
    static int ox02f10_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
    				   struct v4l2_mbus_config *config)
    {
    	struct ox02f10 *sensor = to_ox02f10(sd);
    
    	if (pad)
    		return -EINVAL;
    
    	config->type = V4L2_MBUS_CSI2_DPHY;
    	config->bus.mipi_csi2 = sensor->bus;
    	return 0;
    }
    /* Muni This function is for debig purpose*/
    static void ox02f10_debug_read_reg(struct ox02f10 *sensor,
                                       unsigned int reg)
    {
            unsigned int val;
            int ret;
    
            ret = regmap_read(sensor->regmap, reg, &val);
            if (ret) {
                    dev_err(sensor->dev,
                            "DEBUG: read reg 0x%04x failed: %d\n",
                            reg, ret);
                    return;
            }
    
            dev_info(sensor->dev,
                     "DEBUG: REG 0x%04x = 0x%02x\n",
                     reg, val);
    }
    /* Added debugging purpose eerb*/
    static void ox02f10_debug_errb(struct ox02f10 *sensor,
                                   const char *where)
    {
            int raw;
            int asserted;
    
            if (!sensor->errb_gpio)
                    return;
    
            raw = gpiod_get_raw_value_cansleep(sensor->errb_gpio);
            asserted = gpiod_get_value_cansleep(sensor->errb_gpio);
    
            dev_info(sensor->dev,
                     "DEBUG: ERRB %s: raw=%d asserted=%d\n",
                     where, raw, asserted);
    }
    static int ox02f10_start_streaming(struct ox02f10 *sensor)
    {
    	int ret;
    	 unsigned int val;//Muni
    dev_info(sensor->dev,
    		 "DEBUG: start_streaming entered\n");//Muni
    	ret = regmap_write(sensor->regmap, OX02F10_REG_SOFTWARE_RESET, 1);
    	if (ret){
    		dev_err(sensor->dev,
    			"DEBUG: software reset failed: %d\n", ret);//Muni
    		return ret;
    	}
    	dev_info(sensor->dev,
    		 "DEBUG: software reset OK\n");//Muni
    	usleep_range(5000, 10000);
    	dev_info(sensor->dev,
    		 "DEBUG: writing mode register table\n");//Muni
    	ret = regmap_multi_reg_write(sensor->regmap, ox02f10_1920x1080_regs,
    				     ARRAY_SIZE(ox02f10_1920x1080_regs));
    	if (ret) {
    		dev_err(sensor->dev, "failed to write mode registers: %d\n", ret);
    		return ret;
    	}
    	dev_info(sensor->dev,
    		 "DEBUG: mode register table OK\n");//Muni
    	/* sensor->mutex already protects the control handler. */
    	ret = __v4l2_ctrl_handler_setup(&sensor->ctrls);
    	if (ret){
    		dev_err(sensor->dev,
    			"DEBUG: control setup failed: %d\n", ret);//Muni
    		return ret;
    	}
    	dev_info(sensor->dev,
    		 "DEBUG: controls OK\n");//Muni
    	ret = regmap_write(sensor->regmap, OX02F10_REG_MODE_SELECT,
    			   OX02F10_MODE_STREAMING);
    	if (!ret) {
    		usleep_range(10000, 20000);
    		/* Muni this array and fucntion call is for debug purpose */
    		 /* Muni: check ERRB shortly after stream-on */
            ox02f10_debug_errb(sensor, "after stream-on");
    		 /* Existing register debug */
    		static const unsigned int debug_regs[] = {
            0x0100,
    
            /* PLL */
            0x0301, 0x0303, 0x0304, 0x0305,
            0x0306, 0x0307,
            0x0323, 0x0324, 0x0325,
    
            /* Output geometry/timing */
            0x3808, 0x3809,
            0x380a, 0x380b,
            0x380c, 0x380d,
            0x380e, 0x380f,
    
            /* PWL/output */
            0x431f,
            0x5002,
            0x6016,
    
            /* CSI/MIPI */
            0x4800,
            0x480a,
            0x480b,
            0x480c,
            0x480e,
            0x480f,
            0x4813,
            0x4814,
            0x4837,
            0x484b,
    	};
    
    	unsigned int i;
    	for (i = 0; i < ARRAY_SIZE(debug_regs); i++)
            ox02f10_debug_read_reg(sensor, debug_regs[i]);
    
    		dev_info(sensor->dev,
    			 "DEBUG: MODE_SELECT=STREAMING OK\n");//Muni
    		/* Muni code start */
    		/* -------- Register readback starts here -------- */
    
    		if (!regmap_read(sensor->regmap, 0x0100, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 0100 = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x3808, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 3808 = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x3809, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 3809 = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380a, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380A = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380b, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380B = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380c, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380C = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380d, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380D = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380e, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380E = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x380f, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 380F = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x4800, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 4800 = 0x%02x\n", val);
    
    		if (!regmap_read(sensor->regmap, 0x4837, &val))
    			dev_info(sensor->dev,
    				 "DEBUG: REG 4837 = 0x%02x\n", val);
    
    		/* -------- Register readback ends here -------- */
    		//Muni code ends
    	}
    	return ret;
    }
    
    static int ox02f10_stop_streaming(struct ox02f10 *sensor)
    {
    	 ox02f10_debug_errb(sensor, "before stream-off");//Muni
    	int ret = regmap_write(sensor->regmap, OX02F10_REG_MODE_SELECT,
    			       OX02F10_MODE_STANDBY);
    
    	if (!ret)
    		usleep_range(10000, 20000);
    	return ret;
    }
    
    static int ox02f10_set_stream(struct v4l2_subdev *sd, int enable)
    {
    	struct ox02f10 *sensor = to_ox02f10(sd);
    	int ret = 0;
    dev_info(sensor->dev,
    	 "DEBUG: set_stream enable=%d\n", enable);//Muni
    	enable = !!enable;
    	mutex_lock(&sensor->mutex);
    	if (sensor->streaming == enable)
    		goto unlock;
    	if (enable) {
    		ret = pm_runtime_resume_and_get(sensor->dev);
    		if (ret < 0)
    			goto unlock;
    		ret = ox02f10_start_streaming(sensor);
    		if (ret) {
    			/* Stream-on may have reached the sensor despite an I2C error. */
    			ox02f10_stop_streaming(sensor);
    			pm_runtime_put_sync(sensor->dev);
    			goto unlock;
    		}
    	} else {
    		ret = ox02f10_stop_streaming(sensor);
    		/* Release power even if the standby write failed. */
    		pm_runtime_put_sync(sensor->dev);
    		sensor->streaming = false;
    		goto unlock;
    	}
    	sensor->streaming = enable;
    unlock:
    	mutex_unlock(&sensor->mutex);
    	if (ret)
    		dev_err(sensor->dev, "failed to %s streaming: %d\n",
    			enable ? "start" : "stop", ret);
    	return ret;
    }
    
    static const struct v4l2_subdev_core_ops ox02f10_core_ops = {
    	.subscribe_event = v4l2_ctrl_subdev_subscribe_event,
    	.unsubscribe_event = v4l2_event_subdev_unsubscribe,
    };
    
    static const struct v4l2_subdev_video_ops ox02f10_video_ops = {
    	.g_frame_interval = ox02f10_get_frame_interval,
    	//.s_frame_interval = ox02f10_get_frame_interval,
    	.s_stream = ox02f10_set_stream,
    };
    
    static const struct v4l2_subdev_pad_ops ox02f10_pad_ops = {
    	.init_cfg = ox02f10_init_cfg,
    	.get_fmt = ox02f10_get_fmt,
    	.set_fmt = ox02f10_set_fmt,
    	.get_selection = ox02f10_get_selection,
    	.enum_mbus_code = ox02f10_enum_mbus_code,
    	.enum_frame_size = ox02f10_enum_frame_size,
    	.enum_frame_interval = ox02f10_enum_frame_interval,
    	.get_frame_desc = ox02f10_get_frame_desc,
    	.get_mbus_config = ox02f10_get_mbus_config,
    };
    
    static const struct v4l2_subdev_internal_ops ox02f10_internal_ops = {
    	.open = ox02f10_open,
    };
    
    static const struct v4l2_subdev_ops ox02f10_subdev_ops = {
    	.core = &ox02f10_core_ops,
    	.video = &ox02f10_video_ops,
    	.pad = &ox02f10_pad_ops,
    };
    
    static int ox02f10_runtime_resume(struct device *dev)
    {
    	dev_info(dev, "DEBUG: runtime_resume called\n");//Muni
    	return ox02f10_power_on(to_ox02f10(dev_get_drvdata(dev)));
    }
    
    static int ox02f10_runtime_suspend(struct device *dev)
    {
    	ox02f10_power_off(to_ox02f10(dev_get_drvdata(dev)));
    	return 0;
    }
    
    static int ox02f10_parse_endpoint(struct ox02f10 *sensor)
    {
    	struct v4l2_fwnode_endpoint ep = {
    		.bus_type = V4L2_MBUS_CSI2_DPHY,
    	};
    	struct fwnode_handle *endpoint;
    	unsigned int i;
    	int ret;
    
    	endpoint = fwnode_graph_get_next_endpoint(dev_fwnode(sensor->dev), NULL);
    	if (!endpoint)
    		return dev_err_probe(sensor->dev, -EINVAL,
    				     "missing CSI-2 endpoint\n");
    	ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &ep);
    	fwnode_handle_put(endpoint);
    	if (ret) {
    		dev_err_probe(sensor->dev, ret, "failed to parse CSI-2 endpoint\n");
    		goto free_ep;
    	}
    	if (ep.bus.mipi_csi2.num_data_lanes != OX02F10_NUM_DATA_LANES ||
    	    ep.bus.mipi_csi2.clock_lane != 0 ||
    	    ep.bus.mipi_csi2.flags & V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK) {
    		ret = dev_err_probe(sensor->dev, -EINVAL,
    				    "mode requires four lanes and continuous clock on lane 0\n");
    		goto free_ep;
    	}
    	for (i = 0; i < OX02F10_NUM_DATA_LANES; i++) {
    		if (ep.bus.mipi_csi2.data_lanes[i] != i + 1) {
    			ret = dev_err_probe(sensor->dev, -EINVAL,
    					    "mode requires data-lanes = <1 2 3 4>\n");
    			goto free_ep;
    		}
    	}
    	for (i = 0; i <= OX02F10_NUM_DATA_LANES; i++) {
    		if (ep.bus.mipi_csi2.lane_polarities[i]) {
    			ret = dev_err_probe(sensor->dev, -EINVAL,
    					    "lane polarity inversion is not supported\n");
    			goto free_ep;
    		}
    	}
    	for (i = 0; i < ep.nr_of_link_frequencies; i++)
    		if (ep.link_frequencies[i] == OX02F10_LINK_FREQ)
    			break;
    	if (i == ep.nr_of_link_frequencies) {
    		ret = dev_err_probe(sensor->dev, -EINVAL,
    				    "endpoint must support a %lld Hz link frequency\n",
    				    OX02F10_LINK_FREQ);
    		goto free_ep;
    	}
    	sensor->bus = ep.bus.mipi_csi2;
    	ret = 0;
    free_ep:
    	v4l2_fwnode_endpoint_free(&ep);
    	return ret;
    }
    
    static const struct v4l2_ctrl_ops ox02f10_ctrl_ops = {
    	.s_ctrl = ox02f10_set_ctrl,
    };
    
    static int ox02f10_init_controls(struct ox02f10 *sensor)
    {
    	struct v4l2_ctrl *ctrl;
    	s64 pixel_rate;
    	int ret;
    
    	ret = v4l2_ctrl_handler_init(&sensor->ctrls, 4);
    	if (ret)
    		return ret;
    	sensor->ctrls.lock = &sensor->mutex;
    	ctrl = v4l2_ctrl_new_int_menu(&sensor->ctrls, NULL,
    				      V4L2_CID_LINK_FREQ, 0, 0,
    				      ox02f10_link_freq_menu);
    	if (ctrl)
    		ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
    	pixel_rate = OX02F10_LINK_FREQ * 2 * OX02F10_NUM_DATA_LANES /
    		     OX02F10_BITS_PER_PIXEL;
    	ctrl = v4l2_ctrl_new_std(&sensor->ctrls, NULL, V4L2_CID_PIXEL_RATE,
    				 pixel_rate, pixel_rate, 1, pixel_rate);
    	if (ctrl)
    		ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
    
    	sensor->exposure = v4l2_ctrl_new_std(&sensor->ctrls, &ox02f10_ctrl_ops,
    					    V4L2_CID_EXPOSURE, OX02F10_EXPOSURE_MIN,
    					    OX02F10_VTS_DEFAULT - OX02F10_EXPOSURE_MARGIN,
    					    1, OX02F10_EXPOSURE_DEFAULT);
    	sensor->analogue_gain = v4l2_ctrl_new_std(&sensor->ctrls, &ox02f10_ctrl_ops,
    						 V4L2_CID_ANALOGUE_GAIN,
    						 OX02F10_ANALOG_GAIN_MIN,
    						 OX02F10_ANALOG_GAIN_MAX, 1,
    						 OX02F10_ANALOG_GAIN_DEFAULT);
    	/*
    	 * The table's VTS is smaller than the output height. Its timing units
    	 * need vendor confirmation before exposing HBLANK/VBLANK controls.
    	 * Keep the existing fixed-mode exposure limits in register units.
    	 */
    	if (sensor->ctrls.error) {
    		ret = sensor->ctrls.error;
    		v4l2_ctrl_handler_free(&sensor->ctrls);
    		return ret;
    	}
    	sensor->sd.ctrl_handler = &sensor->ctrls;
    	return 0;
    }
    
    static int ox02f10_probe(struct i2c_client *client)
    {
    	struct device *dev = &client->dev;
    	struct ox02f10 *sensor;
    	int ret;
    
    	sensor = devm_kzalloc(dev, sizeof(*sensor), GFP_KERNEL);
    	if (!sensor)
    		return -ENOMEM;
    	sensor->dev = dev;
    	mutex_init(&sensor->mutex);
    	sensor->regmap = devm_regmap_init_i2c(client, &ox02f10_regmap_config);
    	if (IS_ERR(sensor->regmap)) {
    		ret = PTR_ERR(sensor->regmap);
    		goto destroy_mutex;
    	}
    	sensor->xclk = devm_clk_get(dev, "inck");
    	if (IS_ERR(sensor->xclk)) {
    		ret = dev_err_probe(dev, PTR_ERR(sensor->xclk),
    				    "failed to get input clock\n");
    		goto destroy_mutex;
    	}
    	if (clk_get_rate(sensor->xclk) != OX02F10_XCLK_FREQ) {
    		dev_err(dev, "input clock must be %u Hz\n", OX02F10_XCLK_FREQ);
    		ret = -EINVAL;
    		goto destroy_mutex;
    	}
    	sensor->pwdn_gpio =
    		devm_gpiod_get_optional(dev, "pwdn", GPIOD_OUT_HIGH);
    	if (IS_ERR(sensor->pwdn_gpio)) {
    		ret = dev_err_probe(dev, PTR_ERR(sensor->pwdn_gpio),
    				    "failed to get power-down GPIO\n");
    		goto destroy_mutex;
    	}
    	sensor->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
    	if (IS_ERR(sensor->reset_gpio)) {
    		ret = dev_err_probe(dev, PTR_ERR(sensor->reset_gpio),
    				    "failed to get reset GPIO\n");
    		goto destroy_mutex;
    	}
    	/* Debug purpose added errb */
    	sensor->errb_gpio =
            devm_gpiod_get_optional(dev, "errb", GPIOD_IN);
    
    if (IS_ERR(sensor->errb_gpio)) {
            ret = dev_err_probe(dev,
                                PTR_ERR(sensor->errb_gpio),
                                "failed to get ERRB GPIO\n");
            goto destroy_mutex;
    }
    //Muni End
    	ret = ox02f10_parse_endpoint(sensor);
    	if (ret)
    		goto destroy_mutex;
    	v4l2_i2c_subdev_init(&sensor->sd, client, &ox02f10_subdev_ops);
    	sensor->sd.internal_ops = &ox02f10_internal_ops;
    	ox02f10_fill_format(&sensor->fmt);
    	sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
    			    V4L2_SUBDEV_FL_HAS_EVENTS;
    	sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
    	sensor->pad.flags = MEDIA_PAD_FL_SOURCE;
    	ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
    	if (ret)
    		goto destroy_mutex;
    	ret = ox02f10_init_controls(sensor);
    	if (ret)
    		goto cleanup_entity;
    	ret = ox02f10_power_on(sensor);
    	if (ret)
    		goto free_ctrls;
    	ret = ox02f10_identify(sensor);
    	ox02f10_power_off(sensor);
    	if (ret)
    		goto free_ctrls;
    	pm_runtime_set_suspended(dev);
    	pm_runtime_enable(dev);
    	ret = v4l2_async_register_subdev_sensor(&sensor->sd);
    	if (ret)
    		goto disable_pm;
    	return 0;
    
    disable_pm:
    	pm_runtime_disable(dev);
    free_ctrls:
    	v4l2_ctrl_handler_free(&sensor->ctrls);
    cleanup_entity:
    	media_entity_cleanup(&sensor->sd.entity);
    destroy_mutex:
    	mutex_destroy(&sensor->mutex);
    	return ret;
    }
    
    static void ox02f10_remove(struct i2c_client *client)
    {
    	struct v4l2_subdev *sd = i2c_get_clientdata(client);
    	struct ox02f10 *sensor = to_ox02f10(sd);
    
    	v4l2_async_unregister_subdev(sd);
    	if (sensor->streaming)
    		ox02f10_set_stream(sd, 0);
    	v4l2_ctrl_handler_free(&sensor->ctrls);
    	media_entity_cleanup(&sd->entity);
    	pm_runtime_disable(sensor->dev);
    	if (!pm_runtime_status_suspended(sensor->dev))
    		ox02f10_power_off(sensor);
    	pm_runtime_set_suspended(sensor->dev);
    	mutex_destroy(&sensor->mutex);
    }
    
    static const struct dev_pm_ops ox02f10_pm_ops = {
    	SET_RUNTIME_PM_OPS(ox02f10_runtime_suspend,
    			   ox02f10_runtime_resume, NULL)
    };
    
    static const struct of_device_id ox02f10_of_match[] = {
    	{ .compatible = "ovti,ox02f10" },
    	{ }
    };
    MODULE_DEVICE_TABLE(of, ox02f10_of_match);
    
    static struct i2c_driver ox02f10_i2c_driver = {
    	.driver = {
    		.name = "ox02f10",
    		.of_match_table = ox02f10_of_match,
    		.pm = &ox02f10_pm_ops,
    	},
    	.probe_new = ox02f10_probe,
    	.remove = ox02f10_remove,
    };
    module_i2c_driver(ox02f10_i2c_driver);
    
    MODULE_DESCRIPTION("OmniVision OX02F10 image sensor driver");
    MODULE_LICENSE("GPL");
    // SPDX-License-Identifier: GPL-2.0+
    /*
     * Driver for Cadence MIPI-CSI2 RX Controller v1.3
     *
     * Copyright (C) 2017 Cadence Design Systems Inc.
     */
    
    #include <linux/clk.h>
    #include <linux/delay.h>
    #include <linux/io.h>
    #include <linux/iopoll.h>
    #include <linux/module.h>
    #include <linux/of.h>
    #include <linux/of_graph.h>
    #include <linux/phy/phy.h>
    #include <linux/platform_device.h>
    #include <linux/slab.h>
    
    #include <media/v4l2-ctrls.h>
    #include <media/v4l2-device.h>
    #include <media/v4l2-fwnode.h>
    #include <media/v4l2-subdev.h>
    
    #define CSI2RX_DEVICE_CFG_REG			0x000
    
    #define CSI2RX_SOFT_RESET_REG			0x004
    #define CSI2RX_SOFT_RESET_PROTOCOL			BIT(1)
    #define CSI2RX_SOFT_RESET_FRONT				BIT(0)
    
    #define CSI2RX_STATIC_CFG_REG			0x008
    #define CSI2RX_STATIC_CFG_DLANE_MAP(llane, plane)	((plane) << (16 + (llane) * 4))
    #define CSI2RX_STATIC_CFG_LANES_MASK			GENMASK(11, 8)
    
    #define CSI2RX_DPHY_LANE_CTRL_REG		0x40
    #define CSI2RX_DPHY_CL_RST			BIT(16)
    #define CSI2RX_DPHY_DL_RST(i)			BIT((i) + 12)
    #define CSI2RX_DPHY_CL_EN			BIT(4)
    #define CSI2RX_DPHY_DL_EN(i)			BIT(i)
    
    #define CSI2RX_STREAM_BASE(n)		(((n) + 1) * 0x100)
    
    #define CSI2RX_STREAM_CTRL_REG(n)		(CSI2RX_STREAM_BASE(n) + 0x000)
    #define CSI2RX_STREAM_CTRL_SOFT_RST			BIT(4)
    #define CSI2RX_STREAM_CTRL_STOP				BIT(1)
    #define CSI2RX_STREAM_CTRL_START			BIT(0)
    
    #define CSI2RX_STREAM_STATUS_REG(n)		(CSI2RX_STREAM_BASE(n) + 0x004)
    #define CSI2RX_STREAM_STATUS_RDY			BIT(31)
    
    #define CSI2RX_STREAM_DATA_CFG_REG(n)		(CSI2RX_STREAM_BASE(n) + 0x008)
    #define CSI2RX_STREAM_DATA_CFG_VC_SELECT(n)		BIT((n) + 16)
    #define CSI2RX_STREAM_DATA_CFG_VC_ALL			0
    
    #define CSI2RX_STREAM_CFG_REG(n)		(CSI2RX_STREAM_BASE(n) + 0x00c)
    #define CSI2RX_STREAM_CFG_FIFO_MODE_LARGE_BUF		(1 << 8)
    
    /*Muni AM62A diagnostic: 2 pixels per pixel-interface clock */
    #define CSI2RX_STREAM_CFG_NUM_PIXELS_2              BIT(4)
    
    #define CSI2RX_LANES_MAX	4
    #define CSI2RX_STREAMS_MAX	4
    /* Muni: CSI-2 diagnostic registers adde below macros */
    #define CSI2RX_ERROR_STATUS_REG        0x028
    #define CSI2RX_ERROR_IRQ_MASK_REG      0x02c
    
    enum csi2rx_pads {
    	CSI2RX_PAD_SINK,
    	CSI2RX_PAD_SOURCE_STREAM0,
    	CSI2RX_PAD_SOURCE_STREAM1,
    	CSI2RX_PAD_SOURCE_STREAM2,
    	CSI2RX_PAD_SOURCE_STREAM3,
    	CSI2RX_PAD_MAX,
    };
    
    struct csi2rx_fmt {
    	u32				code;
    	u8				bpp;
    };
    
    struct csi2rx_priv {
    	struct device			*dev;
    	unsigned int			count;
    
    	/*
    	 * Used to prevent race conditions between multiple,
    	 * concurrent calls to start and stop.
    	 */
    	struct mutex			lock;
    
    	void __iomem			*base;
    	struct clk			*sys_clk;
    	struct clk			*p_clk;
    	struct clk			*pixel_clk[CSI2RX_STREAMS_MAX];
    	struct phy			*dphy;
    
    	u8				lanes[CSI2RX_LANES_MAX];
    	u8				num_lanes;
    	u8				max_lanes;
    	u8				max_streams;
    	bool				has_internal_dphy;
    
    	struct v4l2_subdev		subdev;
    	struct v4l2_async_notifier	notifier;
    	struct media_pad		pads[CSI2RX_PAD_MAX];
    
    	/* Remote source */
    	struct v4l2_subdev		*source_subdev;
    	int				source_pad;
    };
    
    static const struct csi2rx_fmt formats[] = {
    	{
    		.code	= MEDIA_BUS_FMT_YUYV8_1X16,
    		.bpp	= 16,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_UYVY8_1X16,
    		.bpp	= 16,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_YVYU8_1X16,
    		.bpp	= 16,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_VYUY8_1X16,
    		.bpp	= 16,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SBGGR8_1X8,
    		.bpp	= 8,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGBRG8_1X8,
    		.bpp	= 8,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGRBG8_1X8,
    		.bpp	= 8,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SRGGB8_1X8,
    		.bpp	= 8,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SBGGR10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGBRG10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGRBG10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SRGGB10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SBGGR12_1X12,
    		.bpp	= 12,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGBRG12_1X12,
    		.bpp	= 12,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGRBG12_1X12,
    		.bpp	= 12,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SRGGB12_1X12,
    		.bpp	= 12,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SRGGI10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGRIG10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SBGGI10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGBIG10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGIRG10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SIGGR10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SGIBG10_1X10,
    		.bpp	= 10,
    	},
    	{
    		.code	= MEDIA_BUS_FMT_SIGGB10_1X10,
    		.bpp	= 10,
    	},
    };
    
    static const struct csi2rx_fmt *csi2rx_get_fmt_by_code(u32 code)
    {
    	unsigned int i;
    
    	for (i = 0; i < ARRAY_SIZE(formats); i++)
    		if (formats[i].code == code)
    			return &formats[i];
    
    	return NULL;
    }
    
    static int csi2rx_get_frame_desc_from_source(struct csi2rx_priv *csi2rx,
    					     struct v4l2_mbus_frame_desc *fd)
    {
    	struct media_pad *remote_pad;
    
    	remote_pad = media_entity_remote_source_pad_unique(&csi2rx->subdev.entity);
    	if (!remote_pad) {
    		dev_err(csi2rx->dev, "No remote pad found for sink\n");
    		return -ENODEV;
    	}
    
    	return v4l2_subdev_call(csi2rx->source_subdev, pad, get_frame_desc,
    				remote_pad->index, fd);
    }
    
    static inline
    struct csi2rx_priv *v4l2_subdev_to_csi2rx(struct v4l2_subdev *subdev)
    {
    	return container_of(subdev, struct csi2rx_priv, subdev);
    }
    
    static void csi2rx_reset(struct csi2rx_priv *csi2rx)
    {
    	unsigned int i;
    
    	writel(CSI2RX_SOFT_RESET_PROTOCOL | CSI2RX_SOFT_RESET_FRONT,
    	       csi2rx->base + CSI2RX_SOFT_RESET_REG);
    
    	udelay(10);
    
    	writel(0, csi2rx->base + CSI2RX_SOFT_RESET_REG);
    
    	/* Reset individual streams. */
    	for (i = 0; i < csi2rx->max_streams; i++) {
    		writel(CSI2RX_STREAM_CTRL_SOFT_RST,
    		       csi2rx->base + CSI2RX_STREAM_CTRL_REG(i));
    		usleep_range(10, 20);
    		writel(0, csi2rx->base + CSI2RX_STREAM_CTRL_REG(i));
    	}
    }
    
    static int csi2rx_configure_external_dphy(struct csi2rx_priv *csi2rx)
    {
    	union phy_configure_opts opts = { };
    	struct phy_configure_opts_mipi_dphy *cfg = &opts.mipi_dphy;
    	struct v4l2_mbus_framefmt *framefmt;
    	struct v4l2_subdev_state *state;
    	const struct csi2rx_fmt *fmt;
    	s64 link_freq;
    	int ret;
    
    	state = v4l2_subdev_get_locked_active_state(&csi2rx->subdev);
    	framefmt = v4l2_subdev_state_get_stream_format(state, CSI2RX_PAD_SINK, 0);
    
    	if (framefmt) {
    		fmt = csi2rx_get_fmt_by_code(framefmt->code);
    	} else {
    		dev_err(csi2rx->dev, "Did not find active sink format\n");
    		fmt = &formats[0];
    	}
    
    	link_freq = v4l2_get_link_freq(csi2rx->source_subdev->ctrl_handler,
    				       fmt->bpp, 2 * csi2rx->num_lanes);
    	if (link_freq < 0)
    		return link_freq;
    /* Muni: debug actual D-PHY input configuration */
    dev_info(csi2rx->dev,
             "DPHY config: link_freq=%lld Hz lanes=%u bpp=%u\n",
             (long long)link_freq,
             csi2rx->num_lanes,
             fmt->bpp);
    	ret = phy_mipi_dphy_get_default_config_for_hsclk(link_freq,
    							 csi2rx->num_lanes, cfg);
    				dev_info(csi2rx->dev,
             "DPHY timings: hs_clk_rate=%lu\n",
             cfg->hs_clk_rate);//Muni
    		 dev_info(csi2rx->dev,
             "DPHY default timing configuration calculated successfully\n");//Muni
    	if (ret)
    		return ret;
    
    	ret = phy_power_on(csi2rx->dphy);
    	if (ret)
    		return ret;
    
    	ret = phy_configure(csi2rx->dphy, &opts);
    	if (ret)
    		phy_power_off(csi2rx->dphy);
    
    	return ret;
    }
    
    static int csi2rx_start(struct csi2rx_priv *csi2rx)
    {
    	unsigned int i;
    	unsigned long lanes_used = 0;
    	u32 reg;
    	int ret;
    
    	ret = clk_prepare_enable(csi2rx->p_clk);
    	if (ret)
    		return ret;
    
    	csi2rx_reset(csi2rx);
    	//Muni start
    /* Muni: clear any stale CSI-2 error status before new stream */
    reg = readl(csi2rx->base + CSI2RX_ERROR_STATUS_REG);
    
    dev_info(csi2rx->dev,
             "CSI2RX error before clear: 0x%08x\n",
             reg);
    
    if (reg)
        writel(reg, csi2rx->base + CSI2RX_ERROR_STATUS_REG);
    
    dev_info(csi2rx->dev,
             "CSI2RX error after clear: 0x%08x\n",
             readl(csi2rx->base + CSI2RX_ERROR_STATUS_REG));
    		 //Muni end
    	reg = csi2rx->num_lanes << 8;
    	for (i = 0; i < csi2rx->num_lanes; i++) {
    		reg |= CSI2RX_STATIC_CFG_DLANE_MAP(i, csi2rx->lanes[i]);
    		set_bit(csi2rx->lanes[i], &lanes_used);
    	}
    
    	/*
    	 * Even the unused lanes need to be mapped. In order to avoid
    	 * to map twice to the same physical lane, keep the lanes used
    	 * in the previous loop, and only map unused physical lanes to
    	 * the rest of our logical lanes.
    	 */
    	for (i = csi2rx->num_lanes; i < csi2rx->max_lanes; i++) {
    		unsigned int idx = find_first_zero_bit(&lanes_used,
    						       csi2rx->max_lanes);
    		set_bit(idx, &lanes_used);
    		reg |= CSI2RX_STATIC_CFG_DLANE_MAP(i, i + 1);
    	}
    
    	writel(reg, csi2rx->base + CSI2RX_STATIC_CFG_REG);
    
    	/* Enable DPHY clk and data lanes. */
    	if (csi2rx->dphy) {
    		reg = CSI2RX_DPHY_CL_EN | CSI2RX_DPHY_CL_RST;
    		for (i = 0; i < csi2rx->num_lanes; i++) {
    			reg |= CSI2RX_DPHY_DL_EN(csi2rx->lanes[i] - 1);
    			reg |= CSI2RX_DPHY_DL_RST(csi2rx->lanes[i] - 1);
    		}
    
    		writel(reg, csi2rx->base + CSI2RX_DPHY_LANE_CTRL_REG);
    
    		ret = csi2rx_configure_external_dphy(csi2rx);
    		if (ret) {
    			dev_err(csi2rx->dev,
    				"Failed to configure external DPHY: %d\n", ret);
    			goto err_disable_pclk;
    		}
    	}
    
    	/*
    	 * Create a static mapping between the CSI virtual channels
    	 * and the output stream.
    	 *
    	 * This should be enhanced, but v4l2 lacks the support for
    	 * changing that mapping dynamically.
    	 *
    	 * We also cannot enable and disable independent streams here,
    	 * hence the reference counting.
    	 */
    	//Muni code starts
    	// for (i = 0; i < csi2rx->max_streams; i++) {
    	// 	ret = clk_prepare_enable(csi2rx->pixel_clk[i]);
    	// 	if (ret)
    	// 		goto err_disable_pixclk;
    	// 	writel(CSI2RX_STREAM_CFG_FIFO_MODE_LARGE_BUF,
    	// 	       csi2rx->base + CSI2RX_STREAM_CFG_REG(i));
    
    	// 	 /* Let all virtual channels through. */
    	// 	/* writel(CSI2RX_STREAM_DATA_CFG_VC_ALL,
    	// 	       csi2rx->base + CSI2RX_STREAM_DATA_CFG_REG(i)); *///Muni commented 368 and 369 lines
    	// 	/* Muni code lines 371 and 372  Route VC0->stream0, VC1->stream1, VC2->stream2, VC3->stream3 */
    	// 		writel(CSI2RX_STREAM_DATA_CFG_VC_SELECT(i),
        //    		csi2rx->base + CSI2RX_STREAM_DATA_CFG_REG(i));	   
    
    	// 	writel(CSI2RX_STREAM_CTRL_START,
    	// 	       csi2rx->base + CSI2RX_STREAM_CTRL_REG(i));
    	// } Muni code ends
    
    	/*
     * Muni diagnostic:
     * OX02F10 uses only VC0, therefore enable only Cadence stream0.
     * Use 2 pixels per pixel-interface clock.
     */
    for (i = 0; i < 1; i++) {
            ret = clk_prepare_enable(csi2rx->pixel_clk[i]);
            if (ret)
                    goto err_disable_pixclk;
    
            writel(CSI2RX_STREAM_CFG_FIFO_MODE_LARGE_BUF |
                   CSI2RX_STREAM_CFG_NUM_PIXELS_2,
                   csi2rx->base + CSI2RX_STREAM_CFG_REG(i));
    
            /* VC0 -> stream0 */
            writel(CSI2RX_STREAM_DATA_CFG_VC_SELECT(i),
                   csi2rx->base + CSI2RX_STREAM_DATA_CFG_REG(i));
    
            writel(CSI2RX_STREAM_CTRL_START,
                   csi2rx->base + CSI2RX_STREAM_CTRL_REG(i));
    }
    
    	ret = clk_prepare_enable(csi2rx->sys_clk);
    	if (ret)
    		goto err_disable_pixclk;
    
    	clk_disable_unprepare(csi2rx->p_clk);
    
    	return 0;
    
    err_disable_pixclk:
    	for (; i > 0; i--)
    		clk_disable_unprepare(csi2rx->pixel_clk[i - 1]);
    
    	if (csi2rx->dphy) {
    		writel(0, csi2rx->base + CSI2RX_DPHY_LANE_CTRL_REG);
    		phy_power_off(csi2rx->dphy);
    	}
    err_disable_pclk:
    	clk_disable_unprepare(csi2rx->p_clk);
    
    	return ret;
    }
    
    static void csi2rx_stop(struct csi2rx_priv *csi2rx)
    {
    	unsigned int i;
    	u32 val;
    	int ret;
    
    	clk_prepare_enable(csi2rx->p_clk);
    	clk_disable_unprepare(csi2rx->sys_clk);
    
    	//Muni  code start
    
    	// for (i = 0; i < csi2rx->max_streams; i++) {
    	// 	writel(CSI2RX_STREAM_CTRL_STOP,
    	// 	       csi2rx->base + CSI2RX_STREAM_CTRL_REG(i));
    
    	// 	ret = readl_relaxed_poll_timeout(csi2rx->base +
    	// 					 CSI2RX_STREAM_STATUS_REG(i),
    	// 					 val,
    	// 					 !(val & CSI2RX_STREAM_STATUS_RDY),
    	// 					 10, 10000);
    	// 	if (ret)
    	// 		dev_warn(csi2rx->dev, "Failed to stop stream%u\n", i);
    
    	// 	clk_disable_unprepare(csi2rx->pixel_clk[i]);
    	// } //Muni code ends
    //Muni code start
    	for (i = 0; i < 1; i++) {
            writel(CSI2RX_STREAM_CTRL_STOP,
                   csi2rx->base + CSI2RX_STREAM_CTRL_REG(i));
    
            ret = readl_relaxed_poll_timeout(
                            csi2rx->base +
                            CSI2RX_STREAM_STATUS_REG(i),
                            val,
                            !(val & CSI2RX_STREAM_STATUS_RDY),
                            10, 10000);
    
            if (ret)
                    dev_warn(csi2rx->dev,
                             "Failed to stop stream%u\n", i);
    
            clk_disable_unprepare(csi2rx->pixel_clk[i]);
    }//Muni code end
    
    	clk_disable_unprepare(csi2rx->p_clk);
    
    	if (csi2rx->dphy) {
    		writel(0, csi2rx->base + CSI2RX_DPHY_LANE_CTRL_REG);
    
    		if (phy_power_off(csi2rx->dphy))
    			dev_warn(csi2rx->dev, "Couldn't power off DPHY\n");
    	}
    }
    
    static int csi2rx_enable_streams(struct v4l2_subdev *subdev,
    				 struct v4l2_subdev_state *state, u32 pad,
    				 u64 streams_mask)
    {
    	struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(subdev);
    	struct media_pad *remote_pad;
    	u64 sink_streams;
    	int ret;
    
    	remote_pad = media_pad_remote_pad_first(&csi2rx->pads[CSI2RX_PAD_SINK]);
    	if (!remote_pad) {
    		dev_err(csi2rx->dev,
    			"Failed to find connected source\n");
    		return -ENODEV;
    	}
    
    	ret = pm_runtime_resume_and_get(csi2rx->dev);
    	if (ret < 0)
    		return ret;
    
    	sink_streams = v4l2_subdev_state_xlate_streams(state,
    						       CSI2RX_PAD_SOURCE_STREAM0,
    						       CSI2RX_PAD_SINK,
    						       &streams_mask);
    
    	mutex_lock(&csi2rx->lock);
    	/*
    	 * If we're not the first users, there's no need to
    	 * enable the whole controller.
    	 */
    	if (!csi2rx->count) {
    		ret = csi2rx_start(csi2rx);
    		if (ret)
    			goto err_stream_start;
    	}
    
    	/* Start streaming on the source */
    	ret = v4l2_subdev_enable_streams(csi2rx->source_subdev, remote_pad->index,
    					 sink_streams);
    	if (ret) {
    		dev_err(csi2rx->dev,
    			"Failed to start streams %#llx on subdev\n",
    			sink_streams);
    		goto err_subdev_enable;
    	}
    /* Munistart : check CSI status immediately after sensor starts transmitting */
    usleep_range(1000, 2000);
    
    dev_info(csi2rx->dev,
             "CSI2RX after sensor start: err=0x%08x status0=0x%08x\n",
             readl(csi2rx->base + CSI2RX_ERROR_STATUS_REG),
             readl(csi2rx->base + CSI2RX_STREAM_STATUS_REG(0)));
    		 //Muni end
    	csi2rx->count++;
    	mutex_unlock(&csi2rx->lock);
    
    	return 0;
    
    err_subdev_enable:
    	if (!csi2rx->count)
    		csi2rx_stop(csi2rx);
    err_stream_start:
    	mutex_unlock(&csi2rx->lock);
    	pm_runtime_put(csi2rx->dev);
    	return ret;
    }
    
    static int csi2rx_disable_streams(struct v4l2_subdev *subdev,
    				  struct v4l2_subdev_state *state, u32 pad,
    				  u64 streams_mask)
    {
    	struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(subdev);
    	struct media_pad *remote_pad;
    	u64 sink_streams;
    
    	sink_streams = v4l2_subdev_state_xlate_streams(state,
    						       CSI2RX_PAD_SOURCE_STREAM0,
    						       CSI2RX_PAD_SINK,
    						       &streams_mask);
    
    	remote_pad = media_pad_remote_pad_first(&csi2rx->pads[CSI2RX_PAD_SINK]);
    	if (!remote_pad ||
    	    v4l2_subdev_disable_streams(csi2rx->source_subdev,
    					remote_pad->index, sink_streams)) {
    		dev_err(csi2rx->dev, "Couldn't disable our subdev\n");
    	}
    
    	mutex_lock(&csi2rx->lock);
    	csi2rx->count--;
    	/*
    	 * Let the last user turn off the lights.
    	 */
    	if (!csi2rx->count)
    		csi2rx_stop(csi2rx);
    	mutex_unlock(&csi2rx->lock);
    
    	pm_runtime_put(csi2rx->dev);
    
    	return 0;
    }
    
    static int _csi2rx_set_routing(struct v4l2_subdev *subdev,
    			       struct v4l2_subdev_state *state,
    			       struct v4l2_subdev_krouting *routing)
    {
    	static const struct v4l2_mbus_framefmt format = {
    		.width = 640,
    		.height = 480,
    		.code = MEDIA_BUS_FMT_UYVY8_1X16,
    		.field = V4L2_FIELD_NONE,
    		.colorspace = V4L2_COLORSPACE_SRGB,
    		.ycbcr_enc = V4L2_YCBCR_ENC_601,
    		.quantization = V4L2_QUANTIZATION_LIM_RANGE,
    		.xfer_func = V4L2_XFER_FUNC_SRGB,
    	};
    	int ret;
    
    	if (routing->num_routes > V4L2_FRAME_DESC_ENTRY_MAX)
    		return -EINVAL;
    
    	ret = v4l2_subdev_routing_validate(subdev, routing,
    					   V4L2_SUBDEV_ROUTING_ONLY_1_TO_1);
    	if (ret)
    		return ret;
    
    	ret = v4l2_subdev_set_routing_with_fmt(subdev, state, routing, &format);
    	if (ret)
    		return ret;
    
    	return 0;
    }
    
    static int csi2rx_set_routing(struct v4l2_subdev *subdev,
    			      struct v4l2_subdev_state *state,
    			      enum v4l2_subdev_format_whence which,
    			      struct v4l2_subdev_krouting *routing)
    {
    	struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(subdev);
    
    	if (which == V4L2_SUBDEV_FORMAT_ACTIVE && csi2rx->count)
    		return -EBUSY;
    
    	return _csi2rx_set_routing(subdev, state, routing);
    }
    
    static int csi2rx_set_fmt(struct v4l2_subdev *subdev,
    			  struct v4l2_subdev_state *state,
    			  struct v4l2_subdev_format *format)
    {
    	struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(subdev);
    	struct v4l2_mbus_framefmt *fmt;
    
    	if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE && csi2rx->count)
    		return -EBUSY;
    
    	/* No transcoding, source and sink formats must match. */
    	if (format->pad >= CSI2RX_PAD_SOURCE_STREAM0)
    		return v4l2_subdev_get_fmt(subdev, state, format);
    	/*
    	 * Default to the first format if the requested media bus code isn't
    	 * supported.
    	 */
    	if (!csi2rx_get_fmt_by_code(format->format.code))
    		format->format.code = formats[0].code;
    
    	/* Set sink format */
    	fmt = v4l2_subdev_state_get_stream_format(state, format->pad,
    						  format->stream);
    	if (!fmt)
    		return -EINVAL;
    
    	*fmt = format->format;
    
    	/* Propagate to source format */
    	fmt = v4l2_subdev_state_get_opposite_stream_format(state, format->pad,
    							   format->stream);
    	if (!fmt)
    		return -EINVAL;
    
    	*fmt = format->format;
    
    	return 0;
    }
    
    static int csi2rx_init_cfg(struct v4l2_subdev *subdev,
    			   struct v4l2_subdev_state *state)
    {
    	struct v4l2_subdev_route routes[] = {
    		{
    			.sink_pad = CSI2RX_PAD_SINK,
    			.sink_stream = 0,
    			.source_pad = CSI2RX_PAD_SOURCE_STREAM0,
    			.source_stream = 0,
    			.flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE,
    		},
    	};
    
    	struct v4l2_subdev_krouting routing = {
    		.num_routes = ARRAY_SIZE(routes),
    		.routes = routes,
    	};
    
    	return _csi2rx_set_routing(subdev, state, &routing);
    }
    
    static int csi2rx_get_frame_desc(struct v4l2_subdev *subdev, unsigned int pad,
    				 struct v4l2_mbus_frame_desc *fd)
    {
    	struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(subdev);
    
    	return csi2rx_get_frame_desc_from_source(csi2rx, fd);
    }
    
    static const struct v4l2_subdev_pad_ops csi2rx_pad_ops = {
    	.get_fmt		= v4l2_subdev_get_fmt,
    	.set_fmt		= csi2rx_set_fmt,
    	.init_cfg		= csi2rx_init_cfg,
    	.get_frame_desc		= csi2rx_get_frame_desc,
    	.set_routing		= csi2rx_set_routing,
    	.enable_streams		= csi2rx_enable_streams,
    	.disable_streams	= csi2rx_disable_streams,
    };
    
    static const struct v4l2_subdev_ops csi2rx_subdev_ops = {
    	.pad		= &csi2rx_pad_ops,
    };
    
    static const struct media_entity_operations csi2rx_media_ops = {
    	.link_validate = v4l2_subdev_link_validate,
    };
    
    static int csi2rx_async_bound(struct v4l2_async_notifier *notifier,
    			      struct v4l2_subdev *s_subdev,
    			      struct v4l2_async_subdev *asd)
    {
    	struct v4l2_subdev *subdev = notifier->sd;
    	struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(subdev);
    
    	csi2rx->source_pad = media_entity_get_fwnode_pad(&s_subdev->entity,
    							 s_subdev->fwnode,
    							 MEDIA_PAD_FL_SOURCE);
    	if (csi2rx->source_pad < 0) {
    		dev_err(csi2rx->dev, "Couldn't find output pad for subdev %s\n",
    			s_subdev->name);
    		return csi2rx->source_pad;
    	}
    
    	csi2rx->source_subdev = s_subdev;
    
    	dev_dbg(csi2rx->dev, "Bound %s pad: %d\n", s_subdev->name,
    		csi2rx->source_pad);
    
    	return media_create_pad_link(&csi2rx->source_subdev->entity,
    				     csi2rx->source_pad,
    				     &csi2rx->subdev.entity, 0,
    				     MEDIA_LNK_FL_ENABLED |
    				     MEDIA_LNK_FL_IMMUTABLE);
    }
    
    static const struct v4l2_async_notifier_operations csi2rx_notifier_ops = {
    	.bound		= csi2rx_async_bound,
    };
    
    static int csi2rx_get_resources(struct csi2rx_priv *csi2rx,
    				struct platform_device *pdev)
    {
    	unsigned char i;
    	u32 dev_cfg;
    	int ret;
    
    	csi2rx->base = devm_platform_ioremap_resource(pdev, 0);
    	if (IS_ERR(csi2rx->base))
    		return PTR_ERR(csi2rx->base);
    
    	csi2rx->sys_clk = devm_clk_get(&pdev->dev, "sys_clk");
    	if (IS_ERR(csi2rx->sys_clk)) {
    		dev_err(&pdev->dev, "Couldn't get sys clock\n");
    		return PTR_ERR(csi2rx->sys_clk);
    	}
    
    	csi2rx->p_clk = devm_clk_get(&pdev->dev, "p_clk");
    	if (IS_ERR(csi2rx->p_clk)) {
    		dev_err(&pdev->dev, "Couldn't get P clock\n");
    		return PTR_ERR(csi2rx->p_clk);
    	}
    
    	csi2rx->dphy = devm_phy_optional_get(&pdev->dev, "dphy");
    	if (IS_ERR(csi2rx->dphy)) {
    		dev_err(&pdev->dev, "Couldn't get external D-PHY\n");
    		return PTR_ERR(csi2rx->dphy);
    	}
    
    	ret = clk_prepare_enable(csi2rx->p_clk);
    	if (ret) {
    		dev_err(&pdev->dev, "Couldn't prepare and enable P clock\n");
    		return ret;
    	}
    
    	dev_cfg = readl(csi2rx->base + CSI2RX_DEVICE_CFG_REG);
    	clk_disable_unprepare(csi2rx->p_clk);
    
    	csi2rx->max_lanes = dev_cfg & 7;
    	if (csi2rx->max_lanes > CSI2RX_LANES_MAX) {
    		dev_err(&pdev->dev, "Invalid number of lanes: %u\n",
    			csi2rx->max_lanes);
    		return -EINVAL;
    	}
    
    	csi2rx->max_streams = (dev_cfg >> 4) & 7;
    	if (csi2rx->max_streams > CSI2RX_STREAMS_MAX) {
    		dev_err(&pdev->dev, "Invalid number of streams: %u\n",
    			csi2rx->max_streams);
    		return -EINVAL;
    	}
    
    	csi2rx->has_internal_dphy = dev_cfg & BIT(3) ? true : false;
    
    	/*
    	 * FIXME: Once we'll have internal D-PHY support, the check
    	 * will need to be removed.
    	 */
    	if (!csi2rx->dphy && csi2rx->has_internal_dphy) {
    		dev_err(&pdev->dev, "Internal D-PHY not supported yet\n");
    		return -EINVAL;
    	}
    
    	for (i = 0; i < csi2rx->max_streams; i++) {
    		char clk_name[16];
    
    		snprintf(clk_name, sizeof(clk_name), "pixel_if%u_clk", i);
    		csi2rx->pixel_clk[i] = devm_clk_get(&pdev->dev, clk_name);
    		if (IS_ERR(csi2rx->pixel_clk[i])) {
    			dev_err(&pdev->dev, "Couldn't get clock %s\n", clk_name);
    			return PTR_ERR(csi2rx->pixel_clk[i]);
    		}
    	}
    
    	return 0;
    }
    
    static int csi2rx_parse_dt(struct csi2rx_priv *csi2rx)
    {
    	struct v4l2_fwnode_endpoint v4l2_ep = { .bus_type = 0 };
    	struct v4l2_async_subdev *asd;
    	struct fwnode_handle *fwh;
    	struct device_node *ep;
    	int ret;
    
    	ep = of_graph_get_endpoint_by_regs(csi2rx->dev->of_node, 0, 0);
    	if (!ep)
    		return -EINVAL;
    
    	fwh = of_fwnode_handle(ep);
    	ret = v4l2_fwnode_endpoint_parse(fwh, &v4l2_ep);
    	if (ret) {
    		dev_err(csi2rx->dev, "Could not parse v4l2 endpoint\n");
    		of_node_put(ep);
    		return ret;
    	}
    
    	if (v4l2_ep.bus_type != V4L2_MBUS_CSI2_DPHY) {
    		dev_err(csi2rx->dev, "Unsupported media bus type: 0x%x\n",
    			v4l2_ep.bus_type);
    		of_node_put(ep);
    		return -EINVAL;
    	}
    
    	memcpy(csi2rx->lanes, v4l2_ep.bus.mipi_csi2.data_lanes,
    	       sizeof(csi2rx->lanes));
    	csi2rx->num_lanes = v4l2_ep.bus.mipi_csi2.num_data_lanes;
    	if (csi2rx->num_lanes > csi2rx->max_lanes) {
    		dev_err(csi2rx->dev, "Unsupported number of data-lanes: %d\n",
    			csi2rx->num_lanes);
    		of_node_put(ep);
    		return -EINVAL;
    	}
    
    	v4l2_async_nf_init(&csi2rx->notifier);
    
    	asd = v4l2_async_nf_add_fwnode_remote(&csi2rx->notifier, fwh,
    					      struct v4l2_async_subdev);
    	of_node_put(ep);
    	if (IS_ERR(asd)) {
    		v4l2_async_nf_cleanup(&csi2rx->notifier);
    		return PTR_ERR(asd);
    	}
    
    	csi2rx->notifier.ops = &csi2rx_notifier_ops;
    
    	ret = v4l2_async_subdev_nf_register(&csi2rx->subdev, &csi2rx->notifier);
    	if (ret)
    		v4l2_async_nf_cleanup(&csi2rx->notifier);
    
    	return ret;
    }
    
    static int csi2rx_suspend(struct device *dev)
    {
    	struct csi2rx_priv *csi2rx = dev_get_drvdata(dev);
    
    	mutex_lock(&csi2rx->lock);
    	if (csi2rx->count)
    		csi2rx_stop(csi2rx);
    	mutex_unlock(&csi2rx->lock);
    
    	return 0;
    }
    
    static int csi2rx_resume(struct device *dev)
    {
    	struct csi2rx_priv *csi2rx = dev_get_drvdata(dev);
    
    	mutex_lock(&csi2rx->lock);
    	if (csi2rx->count)
    		csi2rx_start(csi2rx);
    	mutex_unlock(&csi2rx->lock);
    	return 0;
    }
    
    static int csi2rx_probe(struct platform_device *pdev)
    {
    	struct csi2rx_priv *csi2rx;
    	unsigned int i;
    	int ret;
    
    	csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
    	if (!csi2rx)
    		return -ENOMEM;
    	platform_set_drvdata(pdev, csi2rx);
    	csi2rx->dev = &pdev->dev;
    	mutex_init(&csi2rx->lock);
    
    	ret = csi2rx_get_resources(csi2rx, pdev);
    	if (ret)
    		goto err_free_priv;
    
    	ret = csi2rx_parse_dt(csi2rx);
    	if (ret)
    		goto err_free_priv;
    
    	csi2rx->subdev.owner = THIS_MODULE;
    	csi2rx->subdev.dev = &pdev->dev;
    	v4l2_subdev_init(&csi2rx->subdev, &csi2rx_subdev_ops);
    	v4l2_set_subdevdata(&csi2rx->subdev, &pdev->dev);
    	snprintf(csi2rx->subdev.name, V4L2_SUBDEV_NAME_SIZE, "%s.%s",
    		 KBUILD_MODNAME, dev_name(&pdev->dev));
    
    	/* Create our media pads */
    	csi2rx->subdev.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
    	csi2rx->pads[CSI2RX_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
    	for (i = CSI2RX_PAD_SOURCE_STREAM0; i < CSI2RX_PAD_MAX; i++)
    		csi2rx->pads[i].flags = MEDIA_PAD_FL_SOURCE;
    	csi2rx->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
    		V4L2_SUBDEV_FL_STREAMS;
    	csi2rx->subdev.entity.ops = &csi2rx_media_ops;
    
    	ret = media_entity_pads_init(&csi2rx->subdev.entity, CSI2RX_PAD_MAX,
    				     csi2rx->pads);
    	if (ret)
    		goto err_cleanup;
    
    	ret = v4l2_subdev_init_finalize(&csi2rx->subdev);
    	if (ret)
    		goto err_cleanup;
    
    	pm_runtime_enable(csi2rx->dev);
    	ret = v4l2_async_register_subdev(&csi2rx->subdev);
    	if (ret < 0)
    		goto err_free_subdev;
    
    	dev_info(&pdev->dev,
    		 "Probed CSI2RX with %u/%u lanes, %u streams, %s D-PHY\n",
    		 csi2rx->num_lanes, csi2rx->max_lanes, csi2rx->max_streams,
    		 csi2rx->dphy ? "external" :
    		 csi2rx->has_internal_dphy ? "internal" : "no");
    
    	return 0;
    
    err_free_subdev:
    	pm_runtime_disable(csi2rx->dev);
    	v4l2_subdev_cleanup(&csi2rx->subdev);
    err_cleanup:
    	v4l2_async_nf_unregister(&csi2rx->notifier);
    	v4l2_async_nf_cleanup(&csi2rx->notifier);
    	media_entity_cleanup(&csi2rx->subdev.entity);
    err_free_priv:
    	kfree(csi2rx);
    	return ret;
    }
    
    static int csi2rx_remove(struct platform_device *pdev)
    {
    	struct csi2rx_priv *csi2rx = platform_get_drvdata(pdev);
    
    	v4l2_async_nf_unregister(&csi2rx->notifier);
    	v4l2_async_nf_cleanup(&csi2rx->notifier);
    	v4l2_async_unregister_subdev(&csi2rx->subdev);
    	v4l2_subdev_cleanup(&csi2rx->subdev);
    	media_entity_cleanup(&csi2rx->subdev.entity);
    	pm_runtime_disable(csi2rx->dev);
    	kfree(csi2rx);
    
    	return 0;
    }
    
    static const struct dev_pm_ops csi2rx_pm_ops = {
    	SET_RUNTIME_PM_OPS(csi2rx_suspend, csi2rx_resume, NULL)
    };
    
    static const struct of_device_id csi2rx_of_table[] = {
    	{ .compatible = "cdns,csi2rx" },
    	{ },
    };
    MODULE_DEVICE_TABLE(of, csi2rx_of_table);
    
    static struct platform_driver csi2rx_driver = {
    	.probe	= csi2rx_probe,
    	.remove	= csi2rx_remove,
    
    	.driver	= {
    		.name		= "cdns-csi2rx",
    		.of_match_table	= csi2rx_of_table,
    		.pm		= &csi2rx_pm_ops,
    	},
    };
    module_platform_driver(csi2rx_driver);
    MODULE_AUTHOR("Maxime Ripard <maxime.ripard@bootlin.com>");
    MODULE_DESCRIPTION("Cadence CSI2-RX controller");
    MODULE_LICENSE("GPL");
    


    I have edited j721e-csi2rx.c file as shown below

    Kindly requesting to check and please let me know to check further

    Your guidance is highly appreciated!!

    Thanks & Regards,
    Undali Muniranga

  • Hello  ,

    Gentle remainder for the reply!!

    Thank You!

  • Hello  ,

    Greetings of the day!!

    Currently i am able to see the video on monitor using python script processing instead of ISP/DCC. As python is not highly reliable for RAW12 1920*1080@60fps.

    python script:

    1) cat > /tmp/ox02f10_live_1080p60.py <<'PY'
    #!/usr/bin/env python3
    
    import gi
    import numpy as np
    import time
    
    gi.require_version("Gst", "1.0")
    from gi.repository import Gst, GLib
    
    Gst.init(None)
    
    W = 1920
    H = 1080
    FPS = 60
    
    Y_SIZE = W * H
    UV_SIZE = Y_SIZE // 2
    NV12_SIZE = Y_SIZE + UV_SIZE
    
    FRAME_DURATION = Gst.SECOND // FPS
    
    frame_count = 0
    start_time = None
    
    # Constant neutral chroma for grayscale NV12.
    UV = bytes([128]) * UV_SIZE
    
    
    capture_desc = (
        "v4l2src device=/dev/video3 io-mode=mmap ! "
        "video/x-bayer,"
        "width=1920,"
        "height=1080,"
        "framerate=60/1,"
        "format=rggb12 ! "
        "appsink name=cam "
        "emit-signals=true "
        "sync=false "
        "max-buffers=1 "
        "drop=true"
    )
    
    
    display_desc = (
        "appsrc name=src "
        "is-live=true "
        "format=time "
        "do-timestamp=false "
        "block=false "
        "caps=video/x-raw,"
        "format=NV12,"
        "width=1920,"
        "height=1080,"
        "framerate=60/1 ! "
        "queue max-size-buffers=2 leaky=downstream ! "
        "kmssink "
        "driver-name=tidss "
        "connector-id=40 "
        "plane-id=41 "
        "force-modesetting=true "
        "sync=false"
    )
    
    
    capture = Gst.parse_launch(capture_desc)
    display = Gst.parse_launch(display_desc)
    
    appsink = capture.get_by_name("cam")
    appsrc = display.get_by_name("src")
    
    
    def on_sample(sink):
        global frame_count, start_time
    
        sample = sink.emit("pull-sample")
        if sample is None:
            return Gst.FlowReturn.ERROR
    
        buf = sample.get_buffer()
    
        ok, info = buf.map(Gst.MapFlags.READ)
        if not ok:
            print("ERROR: RAW buffer map failed")
            return Gst.FlowReturn.ERROR
    
        try:
            raw = np.frombuffer(
                info.data,
                dtype="<u2",
                count=W * H
            ).reshape(H, W)
    
            #
            # OX02F10 RAW12:
            # bits 11:0 contain pixel data.
            #
            raw12 = raw & 0x0fff
    
            #
            # Fast RAW12 -> 8-bit grayscale.
            #
            # >>3 rather than >>4 gives a little more
            # brightness for the current exposure.
            #
            y = np.minimum(raw12 >> 3, 255).astype(np.uint8)
    
        finally:
            buf.unmap(info)
    
        #
        # Construct NV12:
        #
        # Y  = actual camera grayscale
        # UV = neutral chroma (128,128)
        #
        payload = y.tobytes() + UV
    
        outbuf = Gst.Buffer.new_allocate(None, NV12_SIZE, None)
        outbuf.fill(0, payload)
    
        outbuf.pts = frame_count * FRAME_DURATION
        outbuf.dts = outbuf.pts
        outbuf.duration = FRAME_DURATION
    
        ret = appsrc.emit("push-buffer", outbuf)
    
        frame_count += 1
    
        if start_time is None:
            start_time = time.monotonic()
    
        if frame_count % 120 == 0:
            elapsed = time.monotonic() - start_time
            fps = frame_count / elapsed
    
            print(
                "Frames: %d   Average processing FPS: %.2f"
                % (frame_count, fps),
                flush=True
            )
    
        return ret
    
    
    appsink.connect("new-sample", on_sample)
    
    
    def bus_message(bus, message, loop):
        t = message.type
    
        if t == Gst.MessageType.ERROR:
            err, debug = message.parse_error()
            print("GStreamer ERROR:", err)
            print(debug)
            loop.quit()
    
        elif t == Gst.MessageType.EOS:
            print("EOS")
            loop.quit()
    
    
    loop = GLib.MainLoop()
    
    for pipe in (capture, display):
        bus = pipe.get_bus()
        bus.add_signal_watch()
        bus.connect("message", bus_message, loop)
    
    
    display.set_state(Gst.State.PLAYING)
    capture.set_state(Gst.State.PLAYING)
    
    print("")
    print("OX02F10 LIVE CAMERA")
    print("===================")
    print("Input  : RAW12 RGGB 1920x1080 @ 60 fps")
    print("Output : NV12       1920x1080 @ 60 fps")
    print("Mode   : Full-resolution grayscale")
    print("")
    print("Move the camera: image should move on HDMI.")
    print("Press Ctrl+C to stop.")
    print("")
    
    try:
        loop.run()
    
    except KeyboardInterrupt:
        print("\nStopping...")
    
    
    capture.set_state(Gst.State.NULL)
    
    appsrc.emit("end-of-stream")
    
    display.set_state(Gst.State.NULL)
    
    print("Stopped.")
    PY
    
    chmod +x /tmp/ox02f10_live_1080p60.py


    Kindly requesting you provide the following files to use DCC/ISP files specific to the OX02F10 camera sensor.to verify the video on monitor:

    1)dcc_viss.bin

    2)dcc_2a.bin

    3)Other required file for testing.

    as per the example mentioned below for imx219. Please find the required files for OX02F10 camera sensor.

    Requirement:

    1)1920*1080 @60fps. 

    2)RAW12.
    3)RGG12

    4)format=NV12

    Your support and guidance is highly appreciated!!

    Thanks & Regards,

    Undali Muniranga

  • Hi Undali,

    Sorry for my delay in response. From my understanding, there are two issues you are facing:

    1. You need help with ISP bringup,
    2. Your sensor stream is not achieving the required throughput.

    Therefore, I want to split this debug into two parts:

    1. The ISP issue: I am not the concerned expert here. Therefore, I suggest that you create a new thread for that. You can also refer to the ISP tuning guide here[1].

    2. The sensor stream issue: For this, I assume you are seeing a lower than expected FPS when using v4l2-ctl to stream. I see you have made some changes in the cadence driver. Is there any reason for that? Also, can you explain the rationale for the change in the j721e-csi2rx driver?

    Regards,
    Jay

    [1]: https://www.ti.com/lit/an/sprad86a/sprad86a.pdf?ts=1791527209666&ref_url=https%253A%252F%252Fe2e.ti.com%252F