-
Notifications
You must be signed in to change notification settings - Fork 2
/
ov5647_mipi_regs.h
executable file
·2117 lines (1660 loc) · 69.9 KB
/
ov5647_mipi_regs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#define AUTHOR "YG"
#define SENSOR_MAT "ov5647"
#define SOFTWARE_SLEEP_REG 0x0100
#define SOFTWARE_RESET_REG 0x0103
#define TIMING_TC_REG20 0x3820 //[0]verical binning [1]vflip_isnr [2]vflip_snr
#define TIMING_TC_REG21 0x3821 //[0]horizontal binning [1]mirror_isnr [2]mirror_snr
//windowing
#define TIMING_X_ADDR_START 0x3800 // 0x00 RW Bit[3:0]: x_addr_start[11:8]
#define TIMING_X_ADDR_START2 0x3801 // 0x0C RW Bit[7:0]: x_addr_start[7:0]
#define TIMING_Y_ADDR_START 0x3802 // 0x00 RW Bit[3:0]: y_addr_start[11:8]
#define TIMING_Y_ADDR_START2 0x3803 // 0x04 RW Bit[7:0]: y_addr_start[7:0]
#define TIMING_X_ADDR_END 0x3804 // 0x0A RW Bit[3:0]: x_addr_end[11:8]
#define TIMING_X_ADDR_END2 0x3805 // 0x33 RW Bit[7:0]: x_addr_end[7:0]
#define TIMING_Y_ADDR_END 0x3806 // 0x07 RW Bit[3:0]: y_addr_end[11:8]
#define TIMING_Y_ADDR_END2 0x3807 // 0xA3 RW Bit[7:0]: y_addr_end[7:0]
//testing
#define ISP_CTRL3D 0x503D // 0x00 [7]test pattern_en [6]rolling_bar [5]tranparent [4]coloring [3:2]bar width [1:0]pattern_type
#define ISP_CTRL3E 0x503E // 0x00 [6]win_cut_en [5]isp_test [4]fixed/random_test [3:0]random_seed
// 50/60 HZ DETECTION
#define CTRL00_50_60_HZ_DETECTION 0x3C00 // CTRL00 0x00 RW
// Bit[5:3]: 50/60 Hz detection control
// Bit[2]: Band definition (Contact local OmniVision FAE for correct settings)
// Bit[1]: Default band (0: 60 Hz as default value, 1: 50 Hz as default value)
// Bit[0]: 50/60 Hz detection control (Contact local OmniVision FAE for correct settings)
#define CTRL01_50_60_HZ_DETECTION 0x3C01 // CTRL01 0x00 RW
// Bit[7]: Band manual mode enable (0: Manual mode disable, 1: Manual mode enable)
// Bit[6:0]: 50/60 Hz detection control (Contact local OmniVision FAE for correct settings)
#define CTRL02_TO_CTRL0B_50_60_HZ_DETECTION_START 0x3C02 // CTRL02 0x00 RW to CTRL0B 0x00 RW
// Bit[7:0]: 50/60 Hz detection control (Contact local OmniVision FAE for correct settings)
#define CTRL0C_50_60_HZ_DETECTION 0x3C0C // CTRL0C – R
// Bit[0]: Detection result (0: Detection result is 60 Hz, 1: Detection result is 50 Hz)
// EXPOSURE
#define EXPOSURE_0x3500 0x3500 // 0x00 RW
// Bit[3:0]: Exposure[19:16]
#define EXPOSURE_0x3501 0x3501 // 0x00 RW
// Bit[7:0]: Exposure[15:8]
#define EXPOSURE_0x3502 0x3502 // 0x20 RW
// Bit[7:0]: Exposure[7:0]
// MANUAL CTRL
#define MANUAL_CTRL_0x3503 0x3503 // 0x00 RW
// Bit[5:4]: Gain latch timing delay
// 00: Gain has no latch delay
// 01: Gain delay of 1 frame
// 11: Gain delay of 2 frames
// Bit[2]: VTS manual
// 0: Auto enable
// 1: Manual enable
// Bit[1]: AGC manual
// 0: Auto enable
// 1: Manual enable
// Bit[0]: AEC manual
// 0: Auto enable
// 1: Manual enable
// AGC
#define AGC_0x350A 0x350A // 0x00 RW
// Bit[1:0]: Gain[9:8] (AGC real gain output high byte)
#define AGC_0x350B 0x350B // 0x00 RW
// Bit[7:0]: Gain[7:0] (AGC real gain output low byte)
// VTS DIFF
#define VTS_DIFF_0x350C 0x350C // 0x06 RW
// Bit[7:0]: vts_diff[15:8]
// When in manual mode, set to 0x00
#define VTS_DIFF_0x350D 0x350D // 0x18 RW
// Bit[7:0]: vts_diff[7:0]
// When in manual mode, set to 0x00
// Average Based Control Function Registers (Table 4-6)
#define WPT_REG_ADDR 0x3A0F // WPT 0x78 RW
// Bit[7:0]: WPT - Stable range high limit (enter)
#define BPT_REG_ADDR 0x3A10 // BPT 0x68 RW
// Bit[7:0]: BPT - Stable range low limit (enter)
#define HIGH_VPT_REG_ADDR 0x3A11 // HIGH VPT 0xD0 RW
// Bit[7:0]: vpt_high - Fast zone high limit when step ratio auto mode is disabled
#define WPT2_REG_ADDR 0x3A1B // WPT2 0x78 RW
// Bit[7:0]: wpt2 - Stable range high limit (from stable state to unstable state)
#define BPT2_REG_ADDR 0x3A1E // BPT2 0x68 RW
// Bit[7:0]: bpt2 - Stable range low limit (from stable state to unstable state)
#define LOW_VPT_REG_ADDR 0x3A1F // LOW VPT 0x40 RW
// Bit[7:0]: vpt_low - Fast zone low limit when step ratio auto mode is disabled
// Average Luminance Control Function Registers (Sheet 1 of 2)------------------------------
#define XSTART_HIGH_BYTE_REG_ADDR 0x5680 // XSTART 0x00 RW
// Bit[3:0]: x_start[11:8] - Horizontal start position for average window high byte
#define XSTART_LOW_BYTE_REG_ADDR 0x5681 // XSTART 0x00 RW
// Bit[7:0]: x_start[7:0] - Horizontal start position for average window low byte
#define YSTART_HIGH_BYTE_REG_ADDR 0x5682 // YSTART 0x00 RW
// Bit[3:0]: y_start[11:8] - Vertical start position for average window high byte
#define YSTART_LOW_BYTE_REG_ADDR 0x5683 // YSTART 0x00 RW
// Bit[7:0]: y_start[7:0] - Vertical start position for average window low byte
#define X_WINDOW_HIGH_BYTE_REG_ADDR 0x5684 // X WINDOW 0x0A RW
// Bit[4:0]: Window X in manual average window mode high byte
#define X_WINDOW_LOW_BYTE_REG_ADDR 0x5685 // X WINDOW 0x20 RW
// Bit[7:0]: Window X in manual average window mode low byte
#define Y_WINDOW_HIGH_BYTE_REG_ADDR 0x5686 // Y WINDOW 0x07 RW
// Bit[3:0]: Window Y in manual average window mode high byte
#define Y_WINDOW_LOW_BYTE_REG_ADDR 0x5687 // Y WINDOW 0x98 RW
// Bit[7:0]: Window Y in manual average window mode low byte
#define WEIGHT00_REG_ADDR 0x5688 // WEIGHT00 0x11 RW
// Bit[7:4]: Window1 weight
// Bit[3:0]: Window0 weight
#define WEIGHT01_REG_ADDR 0x5689 // WEIGHT01 0x11 RW
// Bit[7:4]: Window3 weight
// Bit[3:0]: Window2 weight
#define WEIGHT02_REG_ADDR 0x568A // WEIGHT02 0x11 RW
// Bit[7:4]: Window5 weight
// Bit[3:0]: Window4 weight
#define WEIGHT03_REG_ADDR 0x568B // WEIGHT03 0x11 RW
// Bit[7:4]: Window7 weight
// Bit[3:0]: Window6 weight
#define WEIGHT04_REG_ADDR 0x568C // WEIGHT04 0x11 RW
// Bit[7:4]: Window9 weight
// Bit[3:0]: Window8 weight
#define WEIGHT05_REG_ADDR 0x568D // WEIGHT05 0x11 RW
// Bit[7:4]: Window11 weight
// Bit[3:0]: Window10 weight
#define WEIGHT06_REG_ADDR 0x568E // WEIGHT06 0x11 RW
// Bit[7:4]: Window13 weight
// Bit[3:0]: Window12 weight
#define WEIGHT07_REG_ADDR 0x568F // WEIGHT07 0x11 RW
// Bit[7:4]: Window15 weight
// Bit[3:0]: Window14 weight
#define AVG_CTRL10_REG_ADDR 0x5690 // AVG CTRL10 – R
// Bit[1]: avg_opt - 0: Auto average window, 1: Manual average window
// Bit[0]: avg_man - 0: Auto average window, 1: Manual average window
#define AVG_READOUT_REG_ADDR 0x5693 // AVG READOUT – R
// Bit[7:0]: avg value
// BLC Control Functions (Table 4-8)
#define BLC_CTRL00_REG_ADDR 0x4000 // BLC CTRL00 0x89 RW
// BLC Control (0: disable, 1: enable)
// Bit[7]: blc_median_filter_enable
// Bit[3]: adc_11bit_mode
// Bit[2]: apply2blackline
// Bit[1]: blackline_averageframe
// Bit[0]: BLC enable
#define BLC_CTRL02_REG_ADDR 0x4002 // BLC CTRL02 0x45 RW
// Bit[7]: format_change_en
// format_change_i from fmt will be effect when it is enable
// Bit[6]: blc_auto_en
// Bit[5:0]: reset_frame_num
#define BLC_CTRL05_REG_ADDR 0x4005 // BLC CTRL05 0x18 RW
// Bit[5]: one_line_mode
// Bit[4]: remove_none_imagedata
// Bit[3]: blc_man_1_en
// Bit[2]: blackline_bggr_man_en (0: bgbg/grgr is decided by rblue/hswap, 1: bgbg/grgr fix)
// Bit[1]: bgbg/grgr is decided by rblue/hswap
// Bit[0]: blc_always_up_en (0: Normal freeze, 1: BLC always update)
#define BLC_BLACK_LEVEL_REG_ADDR 0x4009 // BLACK LEVEL 0x10 RW
// Bit[7:0]: blc_blackleveltarget0
#define DEBUG_MODE_REG_ADDR 0x400A //-> 0x400B DEBUG MODE - - Debug Mode
#define BLC_MAN0_MSB_REG_ADDR 0x400C // BLC MAN0 0x00 RW
// Bit[7:0]: blc_man0[15:8]
#define BLC_MAN0_LSB_REG_ADDR 0x400D // BLC MAN0 0x00 RW
// Bit[7:0]: blc_man0[7:0]
#define BLC_MAN1_MSB_REG_ADDR 0x400E // BLC MAN1 0x00 RW
// Bit[7:0]: blc_man1[15:8]
#define BLC_MAN1_LSB_REG_ADDR 0x400F // BLC MAN1 0x00 RW
// Bit[7:0]: blc_man1[7:0]
#define BLC_MAN2_MSB_REG_ADDR 0x4010 // BLC MAN2 0x00 RW
// Bit[7:0]: blc_man2[15:8]
#define BLC_MAN2_LSB_REG_ADDR 0x4011 // BLC MAN2 0x00 RW
// Bit[7:0]: blc_man2[7:0]
#define BLC_MAN3_MSB_REG_ADDR 0x4012 // BLC MAN3 0x00 RW
// Bit[7:0]: blc_man3[15:8]
#define BLC_MAN3_LSB_REG_ADDR 0x4013 // BLC MAN3 0x00 RW
// Bit[7:0]: blc_man3[7:0]
#define BLACK_LEVEL00_MSB_REG_ADDR 0x402C // BLACK_LEVEL00 - R
// Bit[7:0]: blacklevel00[15:8]
#define BLACK_LEVEL00_LSB_REG_ADDR 0x402D // BLACK_LEVEL00 - R
// Bit[7:0]: blacklevel00[7:0]
#define BLACK_LEVEL01_MSB_REG_ADDR 0x402E // BLACK_LEVEL01 - R
// Bit[7:0]: blacklevel01[15:8]
#define BLACK_LEVEL01_LSB_REG_ADDR 0x402F // BLACK_LEVEL01 - R
// Bit[7:0]: blacklevel01[7:0]
#define BLACK_LEVEL10_MSB_REG_ADDR 0x4030 // BLACK_LEVEL10 - R
// Bit[7:0]: blacklevel10[15:8]
#define BLACK_LEVEL10_LSB_REG_ADDR 0x4031 // BLACK_LEVEL10 - R
// Bit[7:0]: blacklevel10[7:0]
#define BLACK_LEVEL11_MSB_REG_ADDR 0x4032 // BLACK_LEVEL11 - R
// Bit[7:0]: blacklevel11[15:8]
#define BLACK_LEVEL11_LSB_REG_ADDR 0x4033 // BLACK_LEVEL11 - R
// Bit[7:0]: blacklevel11[7:0]
#define BLC_MAX_REG_ADDR 0x4050 // BLC MAX 0xFF RW
// Bit[7:0]: blc max black level
#define BLC_STABLE_RANGE_REG_ADDR 0x4051 // STABLE RANGE 0x7F RW
// Bit[7:0]: BLC stable range
#define ONE_CHANNEL_REG_ADDR 0x4052 // ONE CHANNEL 0x00 RW
// Bit[7:0]: blc_one_channel
#define BLC_BR_THRE0_REG_ADDR 0x4060 // BLC BR THRE0 0x00 RW
// Bit[7:0]: blc_br_thr_0
#define BLC_BR_THRE1_REG_ADDR 0x4061 // BLC BR THRE1 0x00 RW
// Bit[7:0]: blc_br_thr_1
#define BLC_BR_THRE2_REG_ADDR 0x4062 // BLC BR THRE2 0x00 RW
// Bit[7:0]: blc_br_thr_2
#define BLC_BR_THRE3_REG_ADDR 0x4063 // BLC BR THRE3 0x00 RW
// Bit[7:0]: blc_br_thr_3
#define BLC_BR_THRE4_REG_ADDR 0x4064 // BLC BR THRE4 0x00 RW
// Bit[7:0]: blc_br_thr_4
#define BLC_BR_THRE5_REG_ADDR 0x4065 // BLC BR THRE5 0x00 RW
// Bit[7:0]: blc_br_thr_5
#define BLC_G_THRE0_REG_ADDR 0x4066 // BLC G THRE0 0x00 RW
// Bit[7:0]: blc_g_thr_0
#define BLC_G_THRE1_REG_ADDR 0x4067 // BLC G THRE1 0x00 RW
// Bit[7:0]: blc_g_thr_1
#define BLC_G_THRE2_REG_ADDR 0x4068 // BLC G THRE2 0x00 RW
// Bit[7:0]: blc_g_thr_2
#define BLC_G_THRE3_REG_ADDR 0x4069 // BLC G THRE3 0x00 RW
// Bit[7:0]: blc_g_thr_3
#define BLC_G_THRE4_REG_ADDR 0x406A // BLC G THRE4 0x00 RW
// Bit[7:0]: blc_g_thr_4
#define BLC_G_THRE5_REG_ADDR 0x406B // BLC G THRE5 0x00 RW
// Bit[7:0]: blc_g_thr_5
#define BLC_BRG_COMP_EN_REG_ADDR 0x406C // BLC BRG COMP EN 0x00 RW
// Bit[7:0]: blc_brg_comp_en
// FREX Strobe Control Functions (Table 4-10)
#define STROBE_CTRL_REG_ADDR 0x3B00 // STROBE CTRL 0x00 RW
// Strobe Control
// Bit[7]: Strobe request ON/OFF (0: OFF/BLC, 1: ON)
// Bit[6]: Strobe pulse reverse
// Bit[3:2]: width_in_xenon (00: 1 row period, 01: 2 row period, 10: 3 row period, 11: 4 row period)
// Bit[1:0]: Strobe mode (00: xenon, 01: LED 1, 10: LED 2, 11: LED 3)
#define STROBE_FREX_EXP_H2_REG_ADDR 0x3B01 // STROBE_FREX_EXP_H2 0x00 RW
// Bit[7:0]: frex_exp[23:16]
#define STROBE_SHUTTER_DLY_HIGH_REG_ADDR 0x3B02 // STROBE_SHUTTER_DLY 0x08 RW
// Bit[4:0]: shutter_dly[12:8]
#define STROBE_SHUTTER_DLY_LOW_REG_ADDR 0x3B03 // STROBE_SHUTTER_DLY 0x00 RW
// Bit[7:0]: shutter_dly[7:0]
#define STROBE_FREX_EXP_H_REG_ADDR 0x3B04 // STROBE_FREX_EXP_H 0x04 RW
// Bit[7:0]: frex_exp[15:8]
#define STROBE_FREX_EXP_L_REG_ADDR 0x3B05 // STROBE_ FREX_EXP_L 0x00 RW
// Bit[7:0]: frex_exp[7:0]
#define FREX_CTRL_REG_ADDR 0x3B06 // FREX CTRL 0x04 RW
// FREX Control
// Bit[7:6]: frex_pchg_width
// Bit[5:4]: frex_strobe_option
// Bit[3:0]: frex_strobe_width[3:0]
#define STROBE_FREX_MODE_SEL_REG_ADDR 0x3B07 // STROBE_FREX_MODE_SEL 0x08 RW
// Bit[3]: fx1_fm_en
// Bit[2]: frex_inv
// Bit[1:0]: FREX mode select (00: frex_strobe mode0, 01: frex_strobe mode1, 1x: Rolling strobe)
#define STROBE_FREX_EXP_REQ_REG_ADDR 0x3B08 // STROBE_FREX_EXP_REQ 0x00 RW
// Bit[0]: frex_exp_req
#define FREX_SHUTTER_DELAY_REG_ADDR 0x3B09 // FREX_SHUTTER_DELAY 0x00 RW
// Bit[2:0]: frex end option
#define STROBE_FREX_RST_LENGTH_REG_ADDR 0x3B0A // STROBE_FREX_RST_LENGTH 0x04 RW
// Bit[2:0]: frex_rst_length[2:0]
#define STROBE_WIDTH_HIGH_REG_ADDR 0x3B0B // STROBE_WIDTH 0x00 RW
// Bit[7:0]: frex_strobe_width[19:12]
#define STROBE_WIDTH_LOW_REG_ADDR 0x3B0C // STROBE_WIDTH 0x3D RW
// Bit[7:0]: frex_strobe_width[11:4]
// OTP Control Function Registers (Table 4-11, Sheet 1 of 2)
#define OTP_DATA_0_REG_ADDR 0x3D00 // OTP_DATA_0 0x00 RW
#define OTP_DATA_1_REG_ADDR 0x3D01 // OTP_DATA_1 0x00 RW
#define OTP_DATA_2_REG_ADDR 0x3D02 // OTP_DATA_2 0x00 RW
#define OTP_DATA_3_REG_ADDR 0x3D03 // OTP_DATA_3 0x00 RW
#define OTP_DATA_4_REG_ADDR 0x3D04 // OTP_DATA_4 0x00 RW
#define OTP_DATA_5_REG_ADDR 0x3D05 // OTP_DATA_5 0x00 RW
#define OTP_DATA_6_REG_ADDR 0x3D06 // OTP_DATA_6 0x00 RW
#define OTP_DATA_7_REG_ADDR 0x3D07 // OTP_DATA_7 0x00 RW
#define OTP_DATA_8_REG_ADDR 0x3D08 // OTP_DATA_8 0x00 RW
#define OTP_DATA_9_REG_ADDR 0x3D09 // OTP_DATA_9 0x00 RW
#define OTP_DATA_A_REG_ADDR 0x3D0A // OTP_DATA_A 0x00 RW
#define OTP_DATA_B_REG_ADDR 0x3D0B // OTP_DATA_B 0x00 RW
#define OTP_DATA_C_REG_ADDR 0x3D0C // OTP_DATA_C 0x00 RW
#define OTP_DATA_D_REG_ADDR 0x3D0D // OTP_DATA_D 0x00 RW
#define OTP_DATA_E_REG_ADDR 0x3D0E // OTP_DATA_E 0x00 RW
#define OTP_DATA_F_REG_ADDR 0x3D0F // OTP_DATA_F 0x00 RW
#define OTP_DATA_10_REG_ADDR 0x3D10 // OTP_DATA_16 0x00 RW
#define OTP_DATA_11_REG_ADDR 0x3D11 // OTP_DATA_17 0x00 RW
#define OTP_DATA_12_REG_ADDR 0x3D12 // OTP_DATA_18 0x00 RW
#define OTP_DATA_13_REG_ADDR 0x3D13 // OTP_DATA_19 0x00 RW
#define OTP_DATA_14_REG_ADDR 0x3D14 // OTP_DATA_20 0x00 RW
#define OTP_DATA_15_REG_ADDR 0x3D15 // OTP_DATA_21 0x00 RW
#define OTP_DATA_16_REG_ADDR 0x3D16 // OTP_DATA_22 0x00 RW
#define OTP_DATA_17_REG_ADDR 0x3D17 // OTP_DATA_23 0x00 RW
#define OTP_DATA_18_REG_ADDR 0x3D18 // OTP_DATA_24 0x00 RW
#define OTP_DATA_19_REG_ADDR 0x3D19 // OTP_DATA_25 0x00 RW
#define OTP_DATA_1A_REG_ADDR 0x3D1A // OTP_DATA_26 0x00 RW
#define OTP_DATA_1B_REG_ADDR 0x3D1B // OTP_DATA_27 0x00 RW
#define OTP_DATA_1C_REG_ADDR 0x3D1C // OTP_DATA_28 0x00 RW
#define OTP_DATA_1D_REG_ADDR 0x3D1D // OTP_DATA_29 0x00 RW
#define OTP_DATA_1E_REG_ADDR 0x3D1E // OTP_DATA_30 0x00 RW
#define OTP_DATA_1F_REG_ADDR 0x3D1F // OTP_DATA_31 0x00 RW
#define OTP_PROGRAM_CTRL_REG_ADDR 0x3D20 // OTP_PROGRAM_CTRL 0x00 RW
// Bit[7]: OTP_wr_busy
// Bit[1]: OTP_program_speed (0: Fast, 1: Slow)
// Bit[0]: OTP_program_enable (Changing from 0 to 1 initiates OTP programming)
#define OTP_LOAD_CTRL_REG_ADDR 0x3D21 // OTP_LOAD_CTRL 0x00 RW
// Bit[7]: OTP_rd_busy
// Bit[1]: OTPspeed (0: Fast, 1: Slow)
// Bit[0]: OTP_load_enable (Changing from 0 to 1 initiates OTP read)
// ISP General Control Registers----------------------------------------------------------------------
#define ISP_CTRL00_REG_ADDR 0x5000 // ISP CTRL00 0xFF RW
// Bit[7]: lenc_en (0: Disable, 1: Enable)
// Bit[2]: bc_en (0: Disable, 1: Enable)
// Bit[1]: wc_en (0: Disable, 1: Enable)
#define ISP_CTRL01_REG_ADDR 0x5001 // ISP CTRL01 0x01 RW
// Bit[0]: awb_en (0: Disable, 1: Enable)
#define ISP_CTRL02_REG_ADDR 0x5002 // ISP CTRL02 0x41 RW
// Bit[6]: win_en (0: Disable, 1: Enable)
// Bit[1]: otp_en (0: Disable, 1: Enable)
// Bit[0]: awb_gain_en (0: Disable, 1: Enable)
#define ISP_CTRL03_REG_ADDR 0x5003 // ISP CTRL03 0x0A RW
// Bit[3]: buf_en (0: Disable, 1: Enable)
// Bit[2]: bin_man_set (0: Manual value as 0, 1: Manual value as 1)
// Bit[1]: bin_auto_en (0: Disable, 1: Enable)
#define ISP_CTRL05_REG_ADDR 0x5005 // ISP CTRL05 0x14 RW
// Bit[4]: awb_bias_on (0: Disable AWB bias, 1: Enable AWB bias)
// Bit[2]: lenc_bias_on (0: Disable LENC bias, 1: Enable LENC bias)
#define ISP_CTRL1F_REG_ADDR 0x501F // ISP CTRL1F 0x03 RW
// Bit[5]: enable_opt (0: Not latched by VSYNC, 1: Enable latched by VSYNC)
// Bit[4]: cal_sel (0: DPC cal_start using SOF, 1: DPC cal_start using VSYNC)
// Bit[2:0]: fmt_sel (010: ISP output data, 011: ISP input data bypass)
#define ISP_CTRL25_REG_ADDR 0x5025 // ISP CTRL25 0x00 RW
// Bit[1:0]: avg_sel (00: Inputs of AVG module are from LENC output,
// 01: Inputs of AVG module are from AWB gain output,
// 10: Inputs of AVG module are from DPC output,
// 11: Inputs of AVG module are from binning output)
#define ISP_CTRL3D_REG_ADDR 0x503D // ISP CTRL3D 0x00 RW
// Bit[7]: test_pattern_en (0: Disable, 1: Enable)
// Bit[6]: rolling_bar (0: Disable rolling bar, 1: Enable rolling bar)
// Bit[5]: transparent_mode (0: Disable, 1: Enable)
// Bit[4]: squ_bw_mode (0: Output square is color square, 1: Output square is black-white square)
// Bit[3:2]: bar_style (When set to a different value, a different type of color bar is output)
// Bit[1:0]: test_pattern_type (00: Color bar, 01: Square, 10: Random data, 11: Input data)
#define ISP_CTRL3E_REG_ADDR 0x503E // ISP CTRL3E 0x00 RW
// Bit[6]: win_cut_en
// Bit[5]: isp_test
// Bit[4]: rnd_same
// Bit[3:0]: rnd_seed
#define ISP_CTRL46_REG_ADDR 0x5046 // ISP CTRL46 0x09 RW
// Bit[3]: awbg_en (0: Disable, 1: Enable)
// Bit[0]: isp_en (0: Disable, 1: Enable)
#define ISP_CTRL4B_REG_ADDR 0x504B // ISP CTRL4B 0x30 RW
// ISP Control (0: disable; 1: enable)
// Bit[5]: post_binning h_enable
// Bit[4]: post_binning v_enable
// Bit[3]: flip_man_en
// Bit[2]: flip_man
// Bit[1]: mirror_man_en
// Bit[0]: Mirror
// LENC Control Registers ------------------------------------------------------------------
#define LENC_CTRL00_REG_ADDR 0x5000 // ISP CTRL00 0x89 RW
// Bit[7]: lenc_en (0: Disable, 1: Enable)
#define MAX_GAIN_REG_ADDR 0x583E // MAX GAIN 0x40 RW
// Bit[7:0]: max_gain
#define MIN_GAIN_REG_ADDR 0x583F // MIN GAIN 0x20 RW
// Bit[7:0]: min_gain
#define MIN_Q_REG_ADDR 0x5840 // MIN Q 0x18 RW
// Bit[6:0]: min_q
#define LENC_CTRL59_REG_ADDR 0x5841 // LENC CTRL59 0x0D RW
// Bit[3]: ADDBLC (0: Disable BLC add back function, 1: Enable BLC add back function)
// Bit[2]: blc_en (0: Disable BLC function, 1: Enable BLC function)
// Bit[1]: gain_man_en
// Bit[0]: autoq_en (0: Used constant Q (0x40), 1: Used calculated Q)
#define BR_HSCALE_REG_ADDR 0x5842 // BR HSCALE 0x01 RW
// Bit[3:0]: br_hscale[11:8]
#define BR_HSCALE2_REG_ADDR 0x5843 // BR HSCALE 0x2B RW
// Bit[7:0]: br_hscale[7:0]
#define BR_VSCALE_REG_ADDR 0x5844 // BR VSCALE 0x01 RW
// Bit[2:0]: br_vscale[10:8]
#define BR_VSCALE2_REG_ADDR 0x5845 // BR VSCALE 0x8D RW
// Bit[7:0]: br_vscale[7:0]
#define G_HSCALE_REG_ADDR 0x5846 // G HSCALE 0x01 RW
// Bit[3:0]: g_hscale[11:8]
#define G_HSCALE2_REG_ADDR 0x5847 // G HSCALE 0x8F RW
// Bit[7:0]: g_hscale[7:0]
#define G_VSCALE_REG_ADDR 0x5848 // G VSCALE 0x01 RW
// Bit[2:0]: g_vscale[10:8]
#define G_VSCALE2_REG_ADDR 0x5849 // G VSCALE 0x09 RW
// Bit[7:0]: g_vscale[7:0]
// AWB Control Registers-----------------------------------------------------------
#define AWB_CTRL_REG_ADDR 0x5180 // AWB CTRL 0x00 RW
// Bit[6]: fast_awb (0: Disable fast AWB calculation function, 1: Enable fast AWB calculation function)
// Bit[5]: freeze_gain_en (Output AWB gains will be input AWB gains when enabled)
// Bit[4]: freeze_sum_en (Sums and averages value will be the same as the previous frame when set)
// Bit[3]: gain_man_en (0: Output calculated gains, 1: Output manual gains set by registers)
// Bit[2]: start_sel (0: Select the last HREF falling edge before gain input as calculated start signal, 1: Select the last HREF falling edge after gain input as calculated start signal)
#define AWB_DELTA_REG_ADDR 0x5181 // AWB DELTA 0x20 RW
// Bit[7]: delta_opt
// Bit[6]: base_man_en
// Bit[5:0]: awb_delta (Delta value to increase or decrease the gains)
#define AWB_STABLE_RANGE_REG_ADDR 0x5182 // STABLE RANGE 0x04 RW
// Bit[7:0]: stable_range
#define STABLE_RANGEW_REG_ADDR 0x5183 // STABLE RANGEW 0x08 RW
// Bit[7:0]: stable_rangew (Wide stable range)
#define HSIZE_MAN_REG_ADDR 0x5184 // HSIZE_MAN 0x01 RW
// Bit[3:0]: hsize_man[11:8]
#define HSIZE_MAN2_REG_ADDR 0x5185 // HSIZE_MAN 0xE0 RW
// Bit[7:0]: hsize_man[7:0]
#define MANUAL_RED_GAIN_MSB_REG_ADDR 0x5186 // MANUAL RED GAIN MSB 0x04 RW
// Bit[3:0]: red_gain_man[11:8]
#define MANUAL_RED_GAIN_LSB_REG_ADDR 0x5187 // MANUAL RED GAIN LSB 0x00 RW
// Bit[7:0]: red_gain_man[7:0]
#define MANUAL_GREEN_GAIN_MSB_REG_ADDR 0x5188 // MANUAL GREEN GAIN MSB 0x04 RW
// Bit[3:0]: grn_gain_man[11:8]
#define MANUAL_GREEN_GAIN_LSB_REG_ADDR 0x5189 // MANUAL GREEN GAIN LSB 0x00 RW
// Bit[7:0]: grn_gain_man[7:0]
#define MANUAL_BLUE_GAIN_MSB_REG_ADDR 0x518A // MANUAL BLUE GAIN MSB 0x04 RW
// Bit[3:0]: blu_gain_man[11:8]
#define MANUAL_BLUE_GAIN_LSB_REG_ADDR 0x518B // MANUAL BLUE GAIN LSB 0x00 RW
// Bit[7:0]: blu_gain_man[7:0]
#define RED_GAIN_LIMIT_REG_ADDR 0x518C // RED GAIN LIMIT 0xF0 RW
// Bit[7:4]: red_gain_up_limit (Highest 4 bits of the upper limit for red gain)
// Bit[3:0]: red_gain_dn_limit (Highest 4 bits of the lower limit for red gain)
// Max red gain is {red_gan_up_limit, FF}
// Min red gain is {red_gain_dn_limit, 00}
#define GREEN_GAIN_LIMIT_REG_ADDR 0x518D // GREEN GAIN LIMIT 0xF0 RW
// Bit[7:4]: green_gain_up_limit (Highest 4 bits of the upper limit for green gain)
// Bit[3:0]: green_gain_dn_limit (Highest 4 bits of the lower limit for green gain)
// Max green gain is {green_gan_up_limit, FF}
// Min green gain is {green_gain_dn_limit, 00}
#define BLUE_GAIN_LIMIT_REG_ADDR 0x518E // BLUE GAIN LIMIT 0xF0 RW
// Bit[7:4]: blue_gain_up_limit (Highest 4 bits of the upper limit for blue gain)
// Bit[3:0]: blue_gain_dn_limit (Highest 4 bits of the lower limit for blue gain)
// Max blue gain is {blue_gan_up_limit, FF}
// Min blue gain is {blue_gain_dn_limit, 00}
// System Control Registers --------------------------------------------------------------------------
#define SC_CMMN_PAD_OEN0_REG_ADDR 0x3000 // SC_CMMN_PAD_OEN0 0x00 RW
// Bit[7:0]: io_y_oen[11:8]
#define SC_CMMN_PAD_OEN1_REG_ADDR 0x3001 // SC_CMMN_PAD_OEN1 0x00 RW
// Bit[7:0]: io_y_oen[7:0]
#define SC_CMMN_PAD_OEN2_REG_ADDR 0x3002 // SC_CMMN_PAD_OEN2 0x00 RW
// Bit[7]: io_vsync_oen
// Bit[6]: io_href_oen
// Bit[5]: io_pclk_oen
// Bit[4]: io_frex_oen
// Bit[3]: io_strobe_oen
// Bit[2]: io_sda_oen
// Bit[1]: io_gpio1_oen
// Bit[0]: io_gpio0_oen
#define SC_CMMN_PLL_CTR13_REG_ADDR 0x3006 // SC_CMMN_PLL_CTR13 0x00 RW
// Bit[5:2]: SDIV (Clock divider for 50/60 Hz detection block)
#define SC_CMMN_PAD_OUT0_REG_ADDR 0x3008 // SC_CMMN_PAD_OUT0 0x00 RW
// Bit[3:0]: io_y_o[11:8]
#define SC_CMMN_PAD_OUT1_REG_ADDR 0x3009 // SC_CMMN_PAD_OUT1 0x00 RW
// Bit[7:0]: io_y_o[7:0]
#define SC_CMMN_CHIP_ID_HIGH_REG_ADDR 0x300A // SC_CMMN_CHIP_ID 0x56 R
// Chip ID High
#define SC_CMMN_CHIP_ID_LOW_REG_ADDR 0x300B // SC_CMMN_CHIP_ID 0x47 R
// Chip ID Low
#define SC_CMMN_SCCB_ID_REG_ADDR 0x300C // SC_CMMN_SCCB_ID 0x6C RW
// SCCB ID
#define SC_CMMN_PAD_OUT2_REG_ADDR 0x300D // SC_CMMN_PAD_OUT2 0x00 RW
// Bit[7]: io_vsync_o
// Bit[6]: io_href_o
// Bit[5]: io_pclk_o
// Bit[4]: io_frex_o
// Bit[3]: io_strobe_o
// Bit[2]: io_sda_o
// Bit[1]: io_gpio1_o
// Bit[0]: io_gpio0_o
#define SC_CMMN_PAD_SEL0_REG_ADDR 0x300E // SC_CMMN_PAD_SEL0 0x00 RW
// Bit[3:0]: io_y_sel[11:8]
// System Control Registers (Sheet 1 of 4)
#define SC_CMMN_PAD_SEL1_REG_ADDR 0x300F // SC_CMMN_PAD_SEL1 0x00 RW
// Bit[7:0]: io_y_sel[7:0]
#define SC_CMMN_PAD_SEL2_REG_ADDR 0x3010 // SC_CMMN_PAD_SEL2 0x00 RW
// Bit[7]: io_vsync_sel
// Bit[6]: io_href_sel
// Bit[5]: io_pclk_sel
// Bit[4]: io_frex_sel
// Bit[3]: io_strobe_sel
// Bit[2]: io_sda_sel
// Bit[1]: io_gpio1_sel
// Bit[0]: io_gpio0_sel
#define SC_CMMN_PAD_PK_REG_ADDR 0x3011 // SC_CMMN_PAD_PK 0x02 RW
// Bit[7]: pd_dato_en
// Bit[6:5]: iP2X3v[3:2]
// Bit[1]: frex_enb
// 0: Enable
// 1: Disable
#define SC_CMMN_A_PWC_PK_O_REG_ADDR 0x3013 // SC_CMMN_A_PWC_PK_O 0x00 RW
// Bit[7:4]: Debug control (Changing these registers is not recommended)
// Bit[3]: bp_regulator
// 0: Enable internal regulator
// 1: Disable internal regulator
// Bit[2:0]: Debug control (Changing these registers is not recommended)
#define SC_CMMN_A_PWC_PK_0B_REG_ADDR 0x3014 // SC_CMMN_A_PWC_PK_0B 0x0B RW
// Bit[6:4]: apd[2:0]
// Bit[3:0]: DIO
#define SC_CMMN_MIPI_PHY_REG_ADDR 0x3016 // SC_CMMN_MIPI_PHY 0x00 RW
// Bit[7:6]: LPH
// Bit[3]: mipi_pad_enable
// Bit[2]: pgm_bp_hs_en_lat (bypass the latch of hs_enable)
// Bit[1:0]: ictl[1:0] (Bias current adjustment)
#define SC_CMMN_MIPI_PHY_10_REG_ADDR 0x3017 // SC_CMMN_MIPI_PHY_10 0x10 RW
// Bit[7:6]: pgm_vcm[1:0] (High-speed common mode voltage)
// Bit[5:4]: pgm_lptx[1:0] (Driving strength of low-speed transmitter)
// Bit[3]: IHALF (Bias current reduction)
// Bit[2]: pgm_vicd (CD input low voltage)
// Bit[1]: pgm_vih (CD input high voltage-dummy)
// Bit[0]: pgm_hs_valid (Valid delay-dummy)
#define SC_CMMN_MIPI_SC_CTRL_REG_ADDR 0x3018 // SC_CMMN_MIPI_SC_CTRL 0x58 RW
// Bit[7:5]: mipi_lane_mode
// 0: One-lane mode
// 1: Two-lane mode
// Bit[4]: r_phy_pd_mipi
// 1: Power down PHY HS TX
// Bit[3]: r_phy_pd_lprx
// 1: Power down PHY LP RX module
// Bit[2]: mipi_en
// 0: DVP enable
// 1: MIPI enable
// Bit[1]: mipi_susp_reg
// MIPI system Suspend register
// 1: Suspend
// Bit[0]: lane_dis_op
// 0: Use mipi_release1/2 and lane_disable1/2 to disable two data lanes
// 1: Use lane_disable1/2 to disable two data lanes
#define SC_CMMN_MIPI_SC_CTRL1_REG_ADDR 0x3019 // SC_CMMN_MIPI_SC_CTRL1 0x10 RW
// Bit[7:0]: MIPI ULPS resume mark1 detect length
#define SC_CMMN_MISC_CTRL_REG_ADDR 0x3021 // SC_CMMN_MISC_CTRL 0x23 RW
// Bit[5]: fst_stby_ctr
// 1: Software standby enter at l_blk
// 0: Software standby enter at v_blk
// Bit[4]: mipi_ctr_en
// 1: Enable MIPI remote reset and suspend control SC
// 0: Disable the function
// Bit[3]: mipi_rst_sel
// 0: MIPI remote reset all registers
// 1: MIPI remote reset all digital modules
// Bit[2]: gpio_pclk_en
// Bit[1]: frex_ef_sel
// Bit[0]: cen_global_o
#define SC_CMMN_MIPI_SC_CTRL2_REG_ADDR 0x3022 // SC_CMMN_MIPI_SC_CTRL2 0x00 RW
// Bit[3]: lptx_ck_opt
// Bit[2]: pull_down_clk_lane
// Bit[1]: pull_down_data_lane2
// Bit[0]: pull_down_data_lane1
#define SC_CMMN_SUB_ID_REG_ADDR 0x302A // SC_CMMN_SUB_ID – R
// Bit[7:4]: Process
// Bit[3:0]: Version
#define SC_CMMN_PLL_CTRL0_REG_ADDR 0x3034 // SC_CMMN_PLL_CTRL0 0x1A RW
// Bit[6:4]: pll_charge_pump
// Bit[3:0]: mipi_bit_mode
// 0000: 8-bit mode
// 0001: 10-bit mode
// Others: Reserved for future use
#define SC_CMMN_PLL_CTRL1_REG_ADDR 0x3035 // SC_CMMN_PLL_CTRL1 0x11 RW
// Bit[7:4]: system_clk_div
// Will slow down all clocks
// Bit[3:0]: scale_divider_mipi
// MIPI PCLK/SERCLK can be slowed down when the image is scaled down
#define SC_CMMN_PLL_MULTIPLIER_REG_ADDR 0x3036 // SC_CMMN_PLL_MULTIPLIER 0x69 RW
// Bit[7:0]: PLL_multiplier (4~252) can be any integer during 4~127 and only even integer during 128~252
#define SC_CMMN_PLL_CTRL13_REG_ADDR 0x3037 // SC_CMMN_PLL_CTRL13 0x03 RW
// Bit[4]: pll_root_div
// 0: Bypass
// 1: /2
// Bit[3:0]: pll_prediv
// 1, 2, 3, 4, 6, 8
#define SC_CMMN_PLL_CTRL_R_REG_ADDR 0x3039 // SC_CMMN_PLL_CTRL_R 0x00 RW
// Bit[7]: pll_bypass
#define SC_CMMN_PLLS_CTRL0_REG_ADDR 0x303A // SC_CMMN_PLLS_CTRL0 0x00 RW
// Bit[7]: plls_bypass
#define SC_CMMN_PLLS_CTRL1_REG_ADDR 0x303B // SC_CMMN_PLLS_CTRL1 0x19 RW
// Bit[4:0]: plls_multiplier
#define SC_CMMN_PLLS_CTRL2_REG_ADDR 0x303C // SC_CMMN_PLLS_CTRL2 0x11 RW
// Bit[6:4]: plls_cp
// Bit[3:0]: plls_sys_div
#define SC_CMMN_PLLS_CTRL3_REG_ADDR 0x303D // SC_CMMN_PLLS_CTRL3 0x30 RW
// Bit[5:4]: plls_pre_div
// 00: /1
// 01: /1.5
// 10: /2
// 11: /3
// Bit[2]: plls_div_r
// 0: /1
// 1: /2
// Bit[1:0]: plls_seld5
// 00: /1
// 01: /1
// 10: /2
// 11: /2.5
//SCCB related registers----------------------------------------------------------
// SCCB Control Registers
#define SCCB_CTRL_REG_ADDR 0x3100 // SCCB CTRL 0x00 RW
// Bit[3]: r_sda_dly_en
// Bit[2:0]: r_sda_dly
#define SCCB_OPT_REG_ADDR 0x3101 // SCCB OPT 0x12 RW
// Bit[4]: en_ss_addr_inc
// Bit[3]: r_sda_byp_sync
// 0: Two clock stage SYNC for sda_i
// 1: No sync for sda_i
// Bit[2]: r_scl_byp_sync
// 0: Two clock stage SYNC for scl_i
// 1: No sync for scl_i
// Bit[1]: r_msk_glitch
// Bit[0]: r_msk_stop
#define SCCB_FILTER_REG_ADDR 0x3102 // SCCB FILTER 0x00 RW
// Bit[7:4]: r_sda_num
// Bit[3:0]: r_scl_num
#define SCCB_SYSREG_REG_ADDR 0x3103 // SCCB SYSREG 0x00 RW
// Bit[6]: ctrl_rst_mipisc
// Bit[5]: ctrl_rst_srb
// Bit[4]: ctrl_rst_sccb_s
// Bit[3]: ctrl_rst_pon_sccb_s
// Bit[2]: ctrl_rst_clkmod
// Bit[1]: ctrl_rst_mipi_phy_rst_o
// Bit[0]: ctrl_pll_rst_o
#define PWUP_DIS_REG_ADDR 0x3104 // PWUP DIS 0x01 RW
// Bit[4]: r_srb_clk_syn_en
// Bit[3]: pwup_dis2
// Bit[2]: pwup_dis1
// Bit[1]: pll_clk_sel
// Bit[0]: pwup_dis0
#define PADCLK_DIV_REG_ADDR 0x3105 // PADCLK DIV 0x11 RW
// Bit[5]: SCLK use p_clk_i
// Bit[4]: Sleep enable
// Bit[3:0]: PADCLK divider for SCCB
#define SRB_CTRL_REG_ADDR 0x3106 // SRB CTRL 0xF9 RW
// Bit[3:2]: PLL clock divider
// 00: pll_sclk
// 01: pll_sclk/2
// 10: pll_sclk/4
// 11: pll_sclk
// Bit[1]: rst_arb
// 1: Reset arbiter
// Bit[0]: sclk_arb
// 1: Enable SCLK to arbiter
//group addressing for SCCB:
// Group Address Registers
#define GROUP_ADR0_REG_ADDR 0x3200 // GROUP ADR0 0x00 RW
// Group0 Start Address in SRAM, actual address is {0x3200[3:0], 4'h0}
#define GROUP_ADR1_REG_ADDR 0x3201 // GROUP ADR1 0x04 RW
// Group1 Start Address in SRAM, actual address is {0x3201[3:0], 4'h0}
#define GROUP_ADR2_REG_ADDR 0x3202 // GROUP ADR2 0x08 RW
// Group2 Start Address in SRAM, actual address is {0x3202[3:0], 4'h0}
#define GROUP_ADR3_REG_ADDR 0x3203 // GROUP ADR3 0x0B RW
// Group3 Start Address in SRAM, actual address is {0x3203[3:0], 4'h0}
#define GROUP_LEN0_REG_ADDR 0x3204 // GROUP LEN0 – R
// Length of Group0
#define GROUP_LEN1_REG_ADDR 0x3205 // GROUP LEN1 – R
// Length of Group1
#define GROUP_LEN2_REG_ADDR 0x3206 // GROUP LEN2 – R
// Length of Group2
#define GROUP_LEN3_REG_ADDR 0x3207 // GROUP LEN3 – R
// Length of Group3
#define GROUP_ACCESS_REG_ADDR 0x3208 // GROUP ACCESS – W
// Bit[7:4]: Group_ctrl
// 0000: Enter group write mode
// 0001: Exit group write mode
// 1010: Initiate group write
// Bit[3:0]: Group ID
// 0000: Group 0
// 0001: Group 1
// 0010: Group 2
// 0011: Group 3
// Timing Control Registers--------------------------------------------------------------------
#define TIMING_X_ADDR_START_REG_ADDR 0x3800 // TIMING_X_ADDR_START 0x00 RW
// Bit[3:0]: x_addr_start[11:8]
#define TIMING_X_ADDR_START_LSB_REG_ADDR 0x3801 // TIMING_X_ADDR_START 0x0C RW
// Bit[7:0]: x_addr_start[7:0]
#define TIMING_Y_ADDR_START_REG_ADDR 0x3802 // TIMING_Y_ADDR_START 0x00 RW
// Bit[3:0]: y_addr_start[11:8]
#define TIMING_Y_ADDR_START_LSB_REG_ADDR 0x3803 // TIMING_Y_ADDR_START 0x04 RW
// Bit[7:0]: y_addr_start[7:0]
#define TIMING_X_ADDR_END_REG_ADDR 0x3804 // TIMING_X_ADDR_END 0x0A RW
// Bit[3:0]: x_addr_end[11:8]
#define TIMING_X_ADDR_END_LSB_REG_ADDR 0x3805 // TIMING_X_ADDR_END 0x33 RW
// Bit[7:0]: x_addr_end[7:0]
#define TIMING_Y_ADDR_END_REG_ADDR 0x3806 // TIMING_Y_ADDR_END 0x07 RW
// Bit[3:0]: y_addr_end[11:8]
#define TIMING_Y_ADDR_END_LSB_REG_ADDR 0x3807 // TIMING_Y_ADDR_END 0xA3 RW
// Bit[7:0]: y_addr_end[7:0]
#define TIMING_X_OUTPUT_SIZE_REG_ADDR 0x3808 // TIMING_X_OUTPUT_SIZE 0x0A RW
// Bit[3:0]: DVP output horizontal width[11:8]
#define TIMING_X_OUTPUT_SIZE_LSB_REG_ADDR 0x3809 // TIMING_X_OUTPUT_SIZE 0x20 RW
// Bit[7:0]: DVP output horizontal width[7:0]
#define TIMING_Y_OUTPUT_SIZE_REG_ADDR 0x380A // TIMING_Y_OUTPUT_SIZE 0x07 RW
// Bit[3:0]: DVP output vertical height[11:8]
#define TIMING_Y_OUTPUT_SIZE_LSB_REG_ADDR 0x380B // TIMING_Y_OUTPUT_SIZE 0x98 RW
// Bit[7:0]: DVP output vertical height[7:0]
#define TIMING_HTS_REG_ADDR 0x380C // TIMING_HTS 0x0A RW
// Bit[4:0]: Total horizontal size[12:8]
#define TIMING_HTS_LSB_REG_ADDR 0x380D // TIMING_HTS 0x8C RW
// Bit[7:0]: Total horizontal size[7:0]
#define TIMING_VTS_REG_ADDR 0x380E // TIMING_VTS 0x07 RW
// Bit[1:0]: Total vertical size[9:8]
#define TIMING_VTS_LSB_REG_ADDR 0x380F // TIMING_VTS 0xB0 RW
// Bit[7:0]: Total vertical
#define TIMING_ISP_X_WIN_REG_ADDR 0x3810 // TIMING_ISP_X_WIN 0x00 RW
// Bit[3:0]: ISP horizontal offset[11:8]
#define TIMING_ISP_X_WIN_LSB_REG_ADDR 0x3811 // TIMING_ISP_X_WIN 0x04 RW
// Bit[7:0]: ISP horizontal offset[7:0]
#define TIMING_ISP_Y_WIN_REG_ADDR 0x3812 // TIMING_ISP_Y_WIN 0x00 RW
// Bit[3:0]: ISP vertical offset[11:8]
#define TIMING_ISP_Y_WIN_LSB_REG_ADDR 0x3813 // TIMING_ISP_Y_WIN 0x02 RW
// Bit[7:0]: ISP vertical offset[7:0]
#define TIMING_X_INC_REG_ADDR 0x3814 // TIMING_X_INC 0x11 RW
// Bit[7:4]: h_odd_inc
// Horizontal subsample odd increase number
// Bit[3:0]: h_even_inc
// Horizontal subsample even increase number
#define TIMING_Y_INC_REG_ADDR 0x3815 // TIMING_Y_INC 0x11 RW
// Bit[7:4]: v_odd_inc
// Vertical subsample odd increase number
// Bit[3:0]: v_even_inc
// Vertical subsample even increase number
#define TIMING_HSYNCST_REG_ADDR 0x3816 // TIMING_HSYNCST 0x00 RW
// Bit[3:0]: HSYNC start point[11:8]
#define TIMING_HSYNCST_LSB_REG_ADDR 0x3817 // TIMING_HSYNCST 0x00 RW
// Bit[7:0]: HSYNC start point[7:0]
#define TIMING_HSYNCW_REG_ADDR 0x3818 // TIMING_HSYNCW 0x00 RW
// Bit[3:0]: HSYNC window[11:8]
#define TIMING_HSYNCW_LSB_REG_ADDR 0x3819 // TIMING_HSYNCW 0x00 RW
// Bit[7:0]: HSYNC window[7:0]
#define TIMING_TC_REG20_REG_ADDR 0x3820 // TIMING_TC_REG20 0x40 RW
// Bit[2]: r_vflip_isp
// Bit[1]: r_vflip_snr
// Bit[0]: r_vbin
#define TIMING_TC_REG21_REG_ADDR 0x3821 // TIMING_TC_REG21 0x00 RW
// Bit[2]: r_mirror_isp
// Bit[1]: r_mirror_snr
// Bit[0]: r_hbin
#define TIMING_TC_REG22_REG_ADDR 0x3822 // TIMING_TC_REG22 0x10 RW
// Bit[4:0]: r_ablc
//Strobe control related registers ---------------------------------------------------------
#define STROBE_RSTRB_REG_ADDR 0x3B00 // STROBE_RSTRB 0x00 RW
// Bit[7]: Strobe ON
// Bit[6]: Reverse
// Bit[3:2]: width_in_xenon
// Bit[1:0]: Mode select
// 00: Xenon
// 01: LED1
// 10: LED2
// 11: LED3
#define STROBE_FREX_EXP_H2_REG_ADDR 0x3B01 // STROBE_FREX_EXP_H2 0x00 RW
// Bit[7:0]: frex_exp[23:16]
#define STROBE_SHUTTER_DLY_REG_ADDR 0x3B02 // STROBE_SHUTTER_DLY 0x08 RW
// Bit[4:0]: shutter_dly[12:8]
#define STROBE_SHUTTER_DLY_LSB_REG_ADDR 0x3B03 // STROBE_SHUTTER_DLY 0x00 RW
// Bit[7:0]: shutter_dly[7:0]
#define STROBE_FREX_EXP_H_REG_ADDR 0x3B04 // STROBE_FREX_EXP_H 0x04 RW
// Bit[7:0]: frex_exp[15:8]
#define STROBE_FREX_EXP_L_REG_ADDR 0x3B05 // STROBE_FREX_EXP_L 0x00 RW
// Bit[7:0]: frex_exp[7:0]
#define STROBE_FREX_CTRL0_REG_ADDR 0x3B06 // STROBE_FREX_CTRL0 0x04 RW
// Bit[7:6]: frex_pchg_width
// Bit[5:4]: frex_strobe_option
// Bit[3:0]: frex_strobe_width[3:0]
#define STROBE_FREX_MODE_SEL_REG_ADDR 0x3B07 // STROBE_FREX_MODE_SEL 0x08 RW
// Bit[4]: frex_sa1
// Bit[3]: fx1_fm_en
// Bit[2]: frex_inv
// Bit[1:0]: Frex mode select
// 00: frex_strobe mode 0
// 01: frex_strobe mode 1
// 1x: Rolling strobe
#define STROBE_FREX_EXP_REQ_REG_ADDR 0x3B08 // STROBE_FREX_EXP_REQ 0x00 RW
// Bit[0]: frex_exp_req
#define FREX_SHUTTER_DELAY_REG_ADDR 0x3B09 // FREX_SHUTTER_DELAY 0x00 RW
// Bit[2:0]: FREX end option
#define STROBE_FREX_RST_LENGTH_REG_ADDR 0x3B0A // STROBE_FREX_RST_LENGTH 0x04 RW
// Bit[2:0]: frex_rst_length[2:0]
#define STROBE_WIDTH_REG_ADDR 0x3B0B // STROBE_WIDTH 0x00 RW
// Bit[7:0]: frex_strobe_width [19:12]
#define STROBE_WIDTH_LSB_REG_ADDR 0x3B0C // STROBE_WIDTH 0x3D RW
// Bit[7:0]: frex_strobe_width[11:4]
//Frame control registers (frame skipping) ----------------------------------------------------
#define FRAME_CONTROL00_REG_ADDR 0x4200 // FRAME CONTROL00 0x00 RW
// Bit[2]: fcnt_eof_sel
// Bit[1]: fcnt_mask_dis
// Bit[0]: Frame counter reset
#define FRAME_CONTROL01_REG_ADDR 0x4201 // FRAME CONTROL01 0x00 RW
// Bit[7:0]: fcnt_eof[15:8]
#define FRAME_CONTROL02_REG_ADDR 0x4202 // FRAME CONTROL02 0x00 RW
// Bit[7:0]: fcnt_eof[7:0]
#define FRAME_CONTROL03_REG_ADDR 0x4203 // FRAME CONTROL03 0x00 RW
//Digital video port (parrallel csi) related registers ------------------------------------------
#define DVP_MODE_SELECT_REG_ADDR 0x4700 // DVP MODE SELECT 0x04 RW
// Bit[3]: CCIR v select
// Bit[2]: CCIR f select
// Bit[1]: CCIR656 mode enable