我在做DM368+IMX122的方案,通过DM368的I2C接口来控制IMX122的寄存器,IMX122工作在主模式,时钟是37.125MHz,复位是通过DM368的GPIO来实现的,且证实复位是有效的(先对IMX122的寄存器写,然后读回,再复位,在读回,最后读回的寄存器值为手册提供复位初始值,我是这样验证复位有效的),寄存器的初始化序列是在海思的方案上验证过
0x3000, 0x0031,
0x3011, 0x0000,
0x302D, 0x0040,
0x3002, 0x000F,
0x3016, 0x003C,
0x3017, 0x0000,
0x3014, 0x0000,
0x3015, 0x0000,
0x3018, 0x00C0,
0x3019, 0x0007,
0x30CE, 0x0016,
0x30CF, 0x0082,
0x30D0, 0x0000,
0x309A, 0x0026,
0x309B, 0x0002,
0x3012, 0x0082,
0x300F, 0x0000,
0x300D, 0x0000,
0x3008, 0x0000,
0x3009, 0x0000,
0x301E, 0x0000,
0x3020, 0x00F0,
0x3021, 0x0000,
0x3022, 0x0040,
0x3005, 0x0065,
0x3006, 0x0004,
0x3003, 0x004C,
0x3004, 0x0004,
0x303B, 0x00E0,
// master mode start 0x302C, 0x0000,
0x3001, 0x0000,
0x3007, 0x0000,
0x300A, 0x0000,
0x300B, 0x0000,
0x300C, 0x0000,
0x300E, 0x0000,
0x3010, 0x0000,
0x3013, 0x0040,
0x301A, 0x00C9,
0x301B, 0x0004,
0x301C, 0x0050,
0x301D, 0x0000,
0x301F, 0x0031,
0x3023, 0x0008,
0x3024, 0x0030,
0x3025, 0x0000,
0x3026, 0x0080,
0x3027, 0x0020,
0x3028, 0x0034,
0x3029, 0x0063,
0x302A, 0x0000,
0x302B, 0x0000,
0x302E, 0x0000,
0x302F, 0x0002,
0x3030, 0x0030,
0x3031, 0x0020,
0x3032, 0x0000,
0x3033, 0x0014,
0x3034, 0x0020,
0x3035, 0x0060,
0x3036, 0x0000,
0x3037, 0x0023,
0x3038, 0x0001,
0x3039, 0x0000,
0x303A, 0x00A8,
0x303B, 0x00E0,
0x303C, 0x0006,
0x303D, 0x0000,
0x303E, 0x0010,
0x303F, 0x0000,
0x3040, 0x0042,
0x3041, 0x0023,
0x3042, 0x003C,
0x3043, 0x0001,
0x3044, 0x0000,
0x3045, 0x0000,
0x3046, 0x0000,
0x3047, 0x0000,
0x3048, 0x0000,
0x3049, 0x0000,
0x304A, 0x0000,
0x304B, 0x0000,
0x304C, 0x0001,
0x304D, 0x0000,
0x304E, 0x0001,
0x304F, 0x0047,
0x3050, 0x0010,
0x3051, 0x0018,
0x3052, 0x0012,
0x3053, 0x0000,
0x3054, 0x0000,
0x3055, 0x0000,
0x3056, 0x0000,
0x3057, 0x0000,
0x3058, 0x00E0,
0x3059, 0x0001,
0x305A, 0x00E0,
0x305B, 0x0001,
0x305C, 0x0000,
0x305D, 0x0000,
0x305E, 0x0000,
0x305F, 0x0000,
0x3060, 0x0000,
0x3061, 0x0000,
0x3062, 0x0076,
0x3063, 0x0000,
0x3064, 0x0001,
0x3065, 0x0000,
0x3066, 0x0000,
0x3067, 0x0000,
0x3068, 0x0000,
0x3069, 0x0000,
0x306A, 0x0000,
0x306B, 0x0000,
0x306C, 0x0000,
0x306D, 0x0000,
0x306E, 0x0000,
0x306F, 0x0000,
0x3070, 0x0000,
0x3071, 0x0000,
0x3072, 0x0000,
0x3073, 0x0001,
0x3074, 0x0006,
0x3075, 0x0007,
0x3076, 0x0080,
0x3077, 0x0000,
0x3078, 0x0040,
0x3079, 0x0008,
0x307A, 0x0000,
0x307B, 0x0000,
0x307C, 0x0010,
0x307D, 0x0000,
0x307E, 0x0000,
0x307F, 0x0000,
0x3080, 0x0006,
0x3081, 0x0019,
0x3082, 0x0000,
0x3083, 0x0064,
0x3084, 0x0000,
0x3085, 0x0001,
0x3086, 0x0000,
0x3087, 0x0000,
0x3088, 0x0000,
0x3089, 0x0000,
0x308A, 0x0000,
0x308B, 0x0000,
0x308C, 0x0000,
0x308D, 0x0000,
0x308E, 0x0000,
0x308F, 0x0000,
0x3090, 0x0000,
0x3091, 0x0000,
0x3092, 0x0001,
0x3093, 0x0001,
0x3094, 0x0000,
0x3095, 0x00FF,
0x3096, 0x000F,
0x3097, 0x0000,
0x3098, 0x0026,
0x3099, 0x0002,
0x309C, 0x009C,
0x309D, 0x0001,
0x309E, 0x0039,
0x309F, 0x0003,
0x30A0, 0x0001,
0x30A1, 0x0005,
0x30A2, 0x00D0,
0x30A3, 0x0007,
0x30A4, 0x0000,
0x30A5, 0x0002,
0x30A6, 0x000B,
0x30A7, 0x000F,
0x30A8, 0x0024,
0x30A9, 0x0000,
0x30AA, 0x0028,
0x30AB, 0x0000,
0x30AC, 0x00E8,
0x30AD, 0x0004,
0x30AE, 0x00EC,
0x30AF, 0x0004,
0x30B0, 0x0000,
0x30B1, 0x0000,
0x30B2, 0x0003,
0x30B3, 0x0005,
0x30B4, 0x0000,
0x30B5, 0x000F,
0x30B6, 0x0010,
0x30B7, 0x0000,
0x30B8, 0x0028,
0x30B9, 0x0000,
0x30BA, 0x00BF,
0x30BB, 0x0007,
0x30BC, 0x00CF,
0x30BD, 0x0007,
0x30BE, 0x00CF,
0x30BF, 0x0007,
0x30C0, 0x00CF,
0x30C1, 0x0007,
0x30C2, 0x00D0,
0x30C3, 0x0007,
0x30C4, 0x0001,
0x30C5, 0x0002,
0x30C6, 0x0003,
0x30C7, 0x0004,
0x30C8, 0x0005,
0x30C9, 0x0006,
0x30CA, 0x0007,
0x30CB, 0x0008,
0x30CC, 0x0001,
0x30CD, 0x0003,
0x30D1, 0x0000,
0x30D2, 0x0000,
0x30D3, 0x0000,
0x30D4, 0x0000,
0x30D5, 0x0000,
0x30D6, 0x0000,
0x30D7, 0x0000,
0x30D8, 0x0000,
0x30D9, 0x0000,
0x30DA, 0x0000,
0x30DB, 0x0000,
0x30DC, 0x0000,
0x30DD, 0x0000,
0x30DE, 0x0000,
0x30DF, 0x0000,
0x30E0, 0x0000,
0x30E1, 0x0000,
0x30E2, 0x0000,
0x30E3, 0x0000,
0x30E4, 0x0000,
0x30E5, 0x0000,
0x30E6, 0x0000,
0x30E7, 0x0000,
0x30E8, 0x0000,
0x30E9, 0x0000,
0x30EA, 0x0000,
0x30EB, 0x0000,
0x30EC, 0x0000,
0x30ED, 0x0000,
0x30EE, 0x0000,
0x30EF, 0x0000,
0x30F0, 0x0000,
0x30F1, 0x0000,
0x30F2, 0x0000,
0x30F3, 0x0000,
0x30F4, 0x0000,
0x30F5, 0x0000,
0x30F6, 0x0000,
0x30F7, 0x0000,
0x30F8, 0x0000,
0x30F9, 0x0000,
0x30FA, 0x0000,
0x30FB, 0x0000,
0x30FC, 0x0000,
0x30FD, 0x0000,
0x30FE, 0x0000,
0x30FF, 0x0000,
// chip_id = 0x3 0x3100, 0x0000,
0x3101, 0x0000,
0x3102, 0x0000,
0x3103, 0x0000,
0x3104, 0x0000,
0x3105, 0x0000,
0x3106, 0x0000,
0x3107, 0x00FA,
0x3108, 0x00FA,
0x3109, 0x0041,
0x310A, 0x0031,
0x310B, 0x0038,
0x310C, 0x0004,
0x310D, 0x0000,
0x310E, 0x001A,
0x310F, 0x0010,
0x3110, 0x0000,
0x3111, 0x0000,
0x3112, 0x0010,
0x3113, 0x0000,
0x3114, 0x0000,
0x3115, 0x0006,
0x3116, 0x0033,
0x3117, 0x000D,
0x3118, 0x0000,
0x3119, 0x0000,
0x311A, 0x0000,
0x311B, 0x0000,
0x311C, 0x0000,
0x311D, 0x0000,
0x311E, 0x0000,
0x311F, 0x0000,
0x3120, 0x0000,
0x3121, 0x0080,
0x3122, 0x000C,
0x3123, 0x0000,
0x3124, 0x0000,
0x3125, 0x0000,
0x3126, 0x0000,
0x3127, 0x0000,
0x3128, 0x0005,
0x3129, 0x0080,
0x312A, 0x0000,
0x312B, 0x0000,
0x312C, 0x0004,
0x312D, 0x0004,
0x312E, 0x0000,
0x312F, 0x0000,
0x3130, 0x009B,
0x3131, 0x0071,
0x3132, 0x0033,
0x3133, 0x0037,
0x3134, 0x00B3,
0x3135, 0x0019,
0x3136, 0x0097,
0x3137, 0x00B1,
0x3138, 0x0019,
0x3139, 0x0001,
0x313A, 0x0050,
0x313B, 0x0000,
0x313C, 0x0035,
0x313D, 0x00B0,
0x313E, 0x0003,
0x313F, 0x00D1,
0x3140, 0x0071,
0x3141, 0x001D,
0x3142, 0x0000,
0x3143, 0x0000,
0x3144, 0x0000,
0x3145, 0x0000,
0x3146, 0x0002,
0x3147, 0x0030,
0x3148, 0x0000,
0x3149, 0x0000,
0x314A, 0x0000,
0x314B, 0x0003,
0x314C, 0x0000,
0x314D, 0x0002,
0x314E, 0x0010,
0x314F, 0x00A0,
0x3150, 0x0000,
0x3151, 0x0007,
0x3152, 0x0040,
0x3153, 0x0080,
0x3154, 0x0000,
0x3155, 0x0002,
0x3156, 0x0050,
0x3157, 0x0002,
0x3158, 0x0023,
0x3159, 0x00E4,
0x315A, 0x0045,
0x315B, 0x0033,
0x315C, 0x0079,
0x315D, 0x00D1,
0x315E, 0x00CC,
0x315F, 0x002F,
0x3160, 0x00B6,
0x3161, 0x00A1,
0x3162, 0x0017,
0x3163, 0x00CB,
0x3164, 0x00E8,
0x3165, 0x00C5,
0x3166, 0x0032,
0x3167, 0x00C0,
0x3168, 0x00A8,
0x3169, 0x00C6,
0x316A, 0x005E,
0x316B, 0x0020,
0x316C, 0x0063,
0x316D, 0x000D,
0x316E, 0x006D,
0x316F, 0x0044,
0x3170, 0x00A6,
0x3171, 0x0032,
0x3172, 0x0024,
0x3173, 0x0050,
0x3174, 0x00C4,
0x3175, 0x002F,
0x3176, 0x00F4,
0x3177, 0x0042,
0x3178, 0x0082,
0x3179, 0x0013,
0x317A, 0x0090,
0x317B, 0x0000,
0x317C, 0x0010,
0x317D, 0x008A,
0x317E, 0x0060,
0x317F, 0x00C4,
0x3180, 0x002F,
0x3181, 0x0084,
0x3182, 0x00F1,
0x3183, 0x000B,
0x3184, 0x00CD,
0x3185, 0x0070,
0x3186, 0x0042,
0x3187, 0x0016,
0x3188, 0x0000,
0x3189, 0x0061,
0x318A, 0x000B,
0x318B, 0x0029,
0x318C, 0x0074,
0x318D, 0x0081,
0x318E, 0x0010,
0x318F, 0x00BA,
0x3190, 0x0018,
0x3191, 0x0022,
0x3192, 0x0011,
0x3193, 0x00E9,
0x3194, 0x0060,
0x3195, 0x0007,
0x3196, 0x0009,
0x3197, 0x00F6,
0x3198, 0x0040,
0x3199, 0x0002,
0x319A, 0x003C,
0x319B, 0x0000,
0x319C, 0x0000,
0x319D, 0x0000,
0x319E, 0x0000,
0x319F, 0x0000,
0x31A0, 0x0080,
0x31A1, 0x000B,
0x31A2, 0x0064,
0x31A3, 0x0090,
0x31A4, 0x008D,
0x31A5, 0x006E,
0x31A6, 0x0098,
0x31A7, 0x0040,
0x31A8, 0x0005,
0x31A9, 0x00D1,
0x31AA, 0x00A8,
0x31AB, 0x0086,
0x31AC, 0x0009,
0x31AD, 0x0054,
0x31AE, 0x0010,
0x31AF, 0x008D,
0x31B0, 0x006A,
0x31B1, 0x00E8,
0x31B2, 0x0082,
0x31B3, 0x0017,
0x31B4, 0x001C,
0x31B5, 0x0060,
0x31B6, 0x00C1,
0x31B7, 0x0031,
0x31B8, 0x00AE,
0x31B9, 0x00D1,
0x31BA, 0x0081,
0x31BB, 0x0016,
0x31BC, 0x0020,
0x31BD, 0x0003,
0x31BE, 0x001B,
0x31BF, 0x0024,
0x31C0, 0x00E0,
0x31C1, 0x00C1,
0x31C2, 0x0033,
0x31C3, 0x00BE,
0x31C4, 0x0051,
0x31C5, 0x0082,
0x31C6, 0x001E,
0x31C7, 0x0040,
0x31C8, 0x0003,
0x31C9, 0x001C,
0x31CA, 0x0034,
0x31CB, 0x00D0,
0x31CC, 0x0081,
0x31CD, 0x0002,
0x31CE, 0x0016,
0x31CF, 0x0000,
0x31D0, 0x0002,
0x31D1, 0x0004,
0x31D2, 0x0000,
0x31D3, 0x0000,
0x31D4, 0x0000,
0x31D5, 0x0080,
0x31D6, 0x0000,
0x31D7, 0x0000,
0x31D8, 0x0023,
0x31D9, 0x0001,
0x31DA, 0x0003,
0x31DB, 0x0002,
0x31DC, 0x0000,
0x31DD, 0x0000,
0x31DE, 0x0000,
0x31DF, 0x0000,
0x31E0, 0x0022,
0x31E1, 0x0000,
0x31E2, 0x0000,
0x31E3, 0x0000,
0x31E4, 0x003F,
0x31E5, 0x0017,
0x31E6, 0x0015,
0x31E7, 0x0000,
0x31E8, 0x0000,
0x31E9, 0x0000,
0x31EA, 0x0000,
0x31EB, 0x0000,
0x31EC, 0x0000,
0x31ED, 0x0000,
0x31EE, 0x0000,
0x31EF, 0x0000,
0x31F0, 0x0000,
0x31F1, 0x0000,
0x31F2, 0x0000,
0x31F3, 0x0000,
0x31F4, 0x0000,
0x31F5, 0x0000,
0x31F6, 0x0000,
0x31F7, 0x0000,
0x31F8, 0x0000,
0x31F9, 0x0000,
0x31FA, 0x0000,
0x31FB, 0x0000,
0x31FC, 0x0000,
0x31FD, 0x0000,
0x31FE, 0x0000,
0x31FF, 0x0000,
// standby cancel 0x3000, 0x0030
应该没有问题,只是在海思的方案上我们采用SPI方式来配置IMX122,现在是通过I2C来配置IMX122,现在的情况是,IMX122的HD,VD,PCLK均没有输出,想请教一下各位,是不是IMX122的I2C接口根本就不能用(我在122的手册上,没有看到I2C操作这部分,我是参考IMX138的接口来做的,寄存器的读写没有问题),有些头痛,先谢谢各位
Alex Liang:
回复 Louis:
谢谢