Skip to content

Commit 5a29f32

Browse files
committed
Revert "media: i2c: imx477: Extract more registers from mode tables to common"
This reverts commit 3da753d.
1 parent 2e991a3 commit 5a29f32

File tree

1 file changed

+172
-43
lines changed

1 file changed

+172
-43
lines changed

drivers/media/i2c/imx477.c

Lines changed: 172 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -552,49 +552,6 @@ static const struct imx477_reg mode_common_regs[] = {
552552
{0x0350, 0x00},
553553
{0xbcf1, 0x02},
554554
{0x3ff9, 0x01},
555-
{0x0220, 0x00},
556-
{0x0221, 0x11},
557-
{0x0381, 0x01},
558-
{0x0383, 0x01},
559-
{0x0385, 0x01},
560-
{0x0387, 0x01},
561-
{0x0902, 0x02},
562-
{0x3140, 0x02},
563-
{0x3c00, 0x00},
564-
{0x9e9a, 0x2f},
565-
{0x9e9b, 0x2f},
566-
{0x9e9c, 0x2f},
567-
{0x9e9d, 0x00},
568-
{0x9e9e, 0x00},
569-
{0x9e9f, 0x00},
570-
{0x0301, 0x05},
571-
{0x0303, 0x02},
572-
{0x030b, 0x02},
573-
{0x030d, 0x02},
574-
{0x0310, 0x01},
575-
{0x0820, 0x07},
576-
{0x0821, 0x08},
577-
{0x0822, 0x00},
578-
{0x0823, 0x00},
579-
{0x080a, 0x00},
580-
{0x080b, 0x7f},
581-
{0x080c, 0x00},
582-
{0x080d, 0x4f},
583-
{0x080e, 0x00},
584-
{0x080f, 0x77},
585-
{0x0810, 0x00},
586-
{0x0811, 0x5f},
587-
{0x0812, 0x00},
588-
{0x0813, 0x57},
589-
{0x0814, 0x00},
590-
{0x0815, 0x4f},
591-
{0x0816, 0x01},
592-
{0x0817, 0x27},
593-
{0x0818, 0x00},
594-
{0x0819, 0x3f},
595-
{0x3e20, 0x01},
596-
{0x3e37, 0x00},
597-
{0x3f50, 0x00},
598555
};
599556

600557
/* 12 mpix 10fps */
@@ -615,8 +572,17 @@ static const struct imx477_reg mode_4056x3040_regs[] = {
615572
{0x00fd, 0x0a},
616573
{0x00fe, 0x0a},
617574
{0x00ff, 0x0a},
575+
{0x0220, 0x00},
576+
{0x0221, 0x11},
577+
{0x0381, 0x01},
578+
{0x0383, 0x01},
579+
{0x0385, 0x01},
580+
{0x0387, 0x01},
618581
{0x0900, 0x00},
619582
{0x0901, 0x11},
583+
{0x0902, 0x02},
584+
{0x3140, 0x02},
585+
{0x3c00, 0x00},
620586
{0x3c01, 0x03},
621587
{0x3c02, 0xa2},
622588
{0x3f0d, 0x01},
@@ -635,6 +601,12 @@ static const struct imx477_reg mode_4056x3040_regs[] = {
635601
{0x936d, 0x28},
636602
{0x9304, 0x00},
637603
{0x9305, 0x00},
604+
{0x9e9a, 0x2f},
605+
{0x9e9b, 0x2f},
606+
{0x9e9c, 0x2f},
607+
{0x9e9d, 0x00},
608+
{0x9e9e, 0x00},
609+
{0x9e9f, 0x00},
638610
{0xa2a9, 0x60},
639611
{0xa2b7, 0x00},
640612
{0x0401, 0x00},
@@ -652,14 +624,42 @@ static const struct imx477_reg mode_4056x3040_regs[] = {
652624
{0x034d, 0xd8},
653625
{0x034e, 0x0b},
654626
{0x034f, 0xe0},
627+
{0x0301, 0x05},
628+
{0x0303, 0x02},
655629
{0x0305, 0x04},
656630
{0x0306, 0x01},
657631
{0x0307, 0x5e},
658632
{0x0309, 0x0c},
633+
{0x030b, 0x02},
634+
{0x030d, 0x02},
635+
{0x0310, 0x01},
636+
{0x0820, 0x07},
637+
{0x0821, 0x08},
638+
{0x0822, 0x00},
639+
{0x0823, 0x00},
640+
{0x080a, 0x00},
641+
{0x080b, 0x7f},
642+
{0x080c, 0x00},
643+
{0x080d, 0x4f},
644+
{0x080e, 0x00},
645+
{0x080f, 0x77},
646+
{0x0810, 0x00},
647+
{0x0811, 0x5f},
648+
{0x0812, 0x00},
649+
{0x0813, 0x57},
650+
{0x0814, 0x00},
651+
{0x0815, 0x4f},
652+
{0x0816, 0x01},
653+
{0x0817, 0x27},
654+
{0x0818, 0x00},
655+
{0x0819, 0x3f},
659656
{0xe04c, 0x00},
660657
{0xe04d, 0x7f},
661658
{0xe04e, 0x00},
662659
{0xe04f, 0x1f},
660+
{0x3e20, 0x01},
661+
{0x3e37, 0x00},
662+
{0x3f50, 0x00},
663663
{0x3f56, 0x02},
664664
{0x3f57, 0xae},
665665
};
@@ -676,8 +676,17 @@ static const struct imx477_reg mode_2028x1520_regs[] = {
676676
{0x0349, 0xd7},
677677
{0x034a, 0x0b},
678678
{0x034b, 0xdf},
679+
{0x0220, 0x00},
680+
{0x0221, 0x11},
681+
{0x0381, 0x01},
682+
{0x0383, 0x01},
683+
{0x0385, 0x01},
684+
{0x0387, 0x01},
679685
{0x0900, 0x01},
680686
{0x0901, 0x22},
687+
{0x0902, 0x02},
688+
{0x3140, 0x02},
689+
{0x3c00, 0x00},
681690
{0x3c01, 0x03},
682691
{0x3c02, 0xa2},
683692
{0x3f0d, 0x01},
@@ -691,6 +700,12 @@ static const struct imx477_reg mode_2028x1520_regs[] = {
691700
{0x936d, 0x5f},
692701
{0x9304, 0x00},
693702
{0x9305, 0x00},
703+
{0x9e9a, 0x2f},
704+
{0x9e9b, 0x2f},
705+
{0x9e9c, 0x2f},
706+
{0x9e9d, 0x00},
707+
{0x9e9e, 0x00},
708+
{0x9e9f, 0x00},
694709
{0xa2a9, 0x60},
695710
{0xa2b7, 0x00},
696711
{0x0401, 0x00},
@@ -708,14 +723,42 @@ static const struct imx477_reg mode_2028x1520_regs[] = {
708723
{0x034d, 0xec},
709724
{0x034e, 0x05},
710725
{0x034f, 0xf0},
726+
{0x0301, 0x05},
727+
{0x0303, 0x02},
711728
{0x0305, 0x04},
712729
{0x0306, 0x01},
713730
{0x0307, 0x5e},
714731
{0x0309, 0x0c},
732+
{0x030b, 0x02},
733+
{0x030d, 0x02},
734+
{0x0310, 0x01},
735+
{0x0820, 0x07},
736+
{0x0821, 0x08},
737+
{0x0822, 0x00},
738+
{0x0823, 0x00},
739+
{0x080a, 0x00},
740+
{0x080b, 0x7f},
741+
{0x080c, 0x00},
742+
{0x080d, 0x4f},
743+
{0x080e, 0x00},
744+
{0x080f, 0x77},
745+
{0x0810, 0x00},
746+
{0x0811, 0x5f},
747+
{0x0812, 0x00},
748+
{0x0813, 0x57},
749+
{0x0814, 0x00},
750+
{0x0815, 0x4f},
751+
{0x0816, 0x01},
752+
{0x0817, 0x27},
753+
{0x0818, 0x00},
754+
{0x0819, 0x3f},
715755
{0xe04c, 0x00},
716756
{0xe04d, 0x7f},
717757
{0xe04e, 0x00},
718758
{0xe04f, 0x1f},
759+
{0x3e20, 0x01},
760+
{0x3e37, 0x00},
761+
{0x3f50, 0x00},
719762
{0x3f56, 0x01},
720763
{0x3f57, 0x6c},
721764
};
@@ -732,8 +775,17 @@ static const struct imx477_reg mode_2028x1080_regs[] = {
732775
{0x0349, 0xd7},
733776
{0x034a, 0x0a},
734777
{0x034b, 0x27},
778+
{0x0220, 0x00},
779+
{0x0221, 0x11},
780+
{0x0381, 0x01},
781+
{0x0383, 0x01},
782+
{0x0385, 0x01},
783+
{0x0387, 0x01},
735784
{0x0900, 0x01},
736785
{0x0901, 0x22},
786+
{0x0902, 0x02},
787+
{0x3140, 0x02},
788+
{0x3c00, 0x00},
737789
{0x3c01, 0x03},
738790
{0x3c02, 0xa2},
739791
{0x3f0d, 0x01},
@@ -747,6 +799,12 @@ static const struct imx477_reg mode_2028x1080_regs[] = {
747799
{0x936d, 0x5f},
748800
{0x9304, 0x00},
749801
{0x9305, 0x00},
802+
{0x9e9a, 0x2f},
803+
{0x9e9b, 0x2f},
804+
{0x9e9c, 0x2f},
805+
{0x9e9d, 0x00},
806+
{0x9e9e, 0x00},
807+
{0x9e9f, 0x00},
750808
{0xa2a9, 0x60},
751809
{0xa2b7, 0x00},
752810
{0x0401, 0x00},
@@ -764,14 +822,42 @@ static const struct imx477_reg mode_2028x1080_regs[] = {
764822
{0x034d, 0xec},
765823
{0x034e, 0x04},
766824
{0x034f, 0x38},
825+
{0x0301, 0x05},
826+
{0x0303, 0x02},
767827
{0x0305, 0x04},
768828
{0x0306, 0x01},
769829
{0x0307, 0x5e},
770830
{0x0309, 0x0c},
831+
{0x030b, 0x02},
832+
{0x030d, 0x02},
833+
{0x0310, 0x01},
834+
{0x0820, 0x07},
835+
{0x0821, 0x08},
836+
{0x0822, 0x00},
837+
{0x0823, 0x00},
838+
{0x080a, 0x00},
839+
{0x080b, 0x7f},
840+
{0x080c, 0x00},
841+
{0x080d, 0x4f},
842+
{0x080e, 0x00},
843+
{0x080f, 0x77},
844+
{0x0810, 0x00},
845+
{0x0811, 0x5f},
846+
{0x0812, 0x00},
847+
{0x0813, 0x57},
848+
{0x0814, 0x00},
849+
{0x0815, 0x4f},
850+
{0x0816, 0x01},
851+
{0x0817, 0x27},
852+
{0x0818, 0x00},
853+
{0x0819, 0x3f},
771854
{0xe04c, 0x00},
772855
{0xe04d, 0x7f},
773856
{0xe04e, 0x00},
774857
{0xe04f, 0x1f},
858+
{0x3e20, 0x01},
859+
{0x3e37, 0x00},
860+
{0x3f50, 0x00},
775861
{0x3f56, 0x01},
776862
{0x3f57, 0x6c},
777863
};
@@ -807,8 +893,17 @@ static const struct imx477_reg mode_1332x990_regs[] = {
807893
{0x00fe, 0x0a},
808894
{0x00ff, 0x0a},
809895
{0xe013, 0x00},
896+
{0x0220, 0x00},
897+
{0x0221, 0x11},
898+
{0x0381, 0x01},
899+
{0x0383, 0x01},
900+
{0x0385, 0x01},
901+
{0x0387, 0x01},
810902
{0x0900, 0x01},
811903
{0x0901, 0x22},
904+
{0x0902, 0x02},
905+
{0x3140, 0x02},
906+
{0x3c00, 0x00},
812907
{0x3c01, 0x01},
813908
{0x3c02, 0x9c},
814909
{0x3f0d, 0x00},
@@ -827,6 +922,12 @@ static const struct imx477_reg mode_1332x990_regs[] = {
827922
{0x936d, 0x5f},
828923
{0x9304, 0x03},
829924
{0x9305, 0x80},
925+
{0x9e9a, 0x2f},
926+
{0x9e9b, 0x2f},
927+
{0x9e9c, 0x2f},
928+
{0x9e9d, 0x00},
929+
{0x9e9e, 0x00},
930+
{0x9e9f, 0x00},
830931
{0xa2a9, 0x27},
831932
{0xa2b7, 0x03},
832933
{0x0401, 0x00},
@@ -844,14 +945,42 @@ static const struct imx477_reg mode_1332x990_regs[] = {
844945
{0x034d, 0x34},
845946
{0x034e, 0x03},
846947
{0x034f, 0xde},
948+
{0x0301, 0x05},
949+
{0x0303, 0x02},
847950
{0x0305, 0x02},
848951
{0x0306, 0x00},
849952
{0x0307, 0xaf},
850953
{0x0309, 0x0a},
954+
{0x030b, 0x02},
955+
{0x030d, 0x02},
956+
{0x0310, 0x01},
957+
{0x0820, 0x07},
958+
{0x0821, 0x08},
959+
{0x0822, 0x00},
960+
{0x0823, 0x00},
961+
{0x080a, 0x00},
962+
{0x080b, 0x7f},
963+
{0x080c, 0x00},
964+
{0x080d, 0x4f},
965+
{0x080e, 0x00},
966+
{0x080f, 0x77},
967+
{0x0810, 0x00},
968+
{0x0811, 0x5f},
969+
{0x0812, 0x00},
970+
{0x0813, 0x57},
971+
{0x0814, 0x00},
972+
{0x0815, 0x4f},
973+
{0x0816, 0x01},
974+
{0x0817, 0x27},
975+
{0x0818, 0x00},
976+
{0x0819, 0x3f},
851977
{0xe04c, 0x00},
852978
{0xe04d, 0x5f},
853979
{0xe04e, 0x00},
854980
{0xe04f, 0x1f},
981+
{0x3e20, 0x01},
982+
{0x3e37, 0x00},
983+
{0x3f50, 0x00},
855984
{0x3f56, 0x00},
856985
{0x3f57, 0xbf},
857986
};

0 commit comments

Comments
 (0)