Hello,Haifeng,
Sorry, I have your schematic and BSP file.
(1)PMIC_INT:
you connected this pin to CSI_DAT5 pin, so it is GPIO5_23.
(2)mc34708 initialization.
I2C board info structure has been initialized in
mx53_znjt_pmic_mc34708.c, you don't need to do it in BSP file again.
So this is wrong:( delete it from mx53_znjt.c)
static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {
{
.type = "mc34708",
.addr = 0x1C,
},
};
(3)board initialization has errors in function(mxc_board_init(void)
--iomux_v3_cfg_t mc34708_int = MX53_PAD_CSI0_DAT12__GPIO5_30;
(your GPIO is GPIO5_23, why did you muxed this pin ? --- delete it, please !
--following lines can not be run----
if (board_is_mx53_znjt_mc34708()) {
/* set pmic INT gpio pin */
if (board_is_rev(BOARD_REV_2)) {/*Board rev A*/
printk("error, CSI0_DAT12 does not use\n");
} else if (board_is_rev(BOARD_REV_4)) {/*Board rev B*/
mc34708_int = MX53_PAD_CSI0_DAT5__GPIO5_23;
mx53_znjt_mc34708_irq = MX53_ZNJT_MC34708_IRQ_REVB;
}
you see your machine setup at the end of BSP file:
MACHINE_START(MX53_LOCO, "Freescale MX53 ZNJT Board")
/* Maintainer: Freescale Semiconductor, Inc. */
.fixup = fixup_mxc_board,
.map_io = mx5_map_io,
.init_irq = mx5_init_irq,
.init_machine = mxc_board_init,
.timer = &mxc_timer,
MACHINE_END
Your board is MX53_LOCO, why you use :
if (board_is_mx53_znjt_mc34708()) {
....
....
******So modify static void __init mxc_board_init(void) function like following :*******
static void __init mxc_board_init(void)
{
// iomux_v3_cfg_t mc34708_int = MX53_PAD_CSI0_DAT12__GPIO5_30;
// iomux_v3_cfg_t da9052_csi0_d12;
mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk");
mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk");
mxc_ipu_data.csi_clk[0] = clk_get(NULL, "ssi_ext1_clk");
mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk");
clk_put(mxc_spdif_data.spdif_core_clk);
mxc_cpu_common_init();
mx53_znjt_io_init();
mxc_register_device(&mxc_dma_device, NULL);
mxc_register_device(&mxc_wdt_device, NULL);
mxc_register_device(&mxci2c_devices[0], &mxci2c_data);
mxc_register_device(&mxci2c_devices[1], &mxci2c_data);
// mxc_register_device(&mxci2c_devices[2], &mxci2c_data);
// if (board_is_mx53_znjt_mc34708()) {
/* set pmic INT gpio pin */
// if (board_is_rev(BOARD_REV_2)) {/*Board rev A*/
// printk("error, CSI0_DAT12 does not use\n");
// } else if (board_is_rev(BOARD_REV_4)) {/*Board rev B*/
mc34708_int = MX53_PAD_CSI0_DAT5__GPIO5_23;
mx53_znjt_mc34708_irq = MX53_ZNJT_MC34708_IRQ_REVB;
// }
mxc_iomux_v3_setup_pad(mc34708_int);
gpio_request(MX53_ZNJT_MC34708_IRQ_REVB, "pmic-int");
gpio_direction_input(MX53_ZNJT_MC34708_IRQ_REVB);
mx53_znjt_init_mc34708(MX53_ZNJT_MC34708_IRQ_REVB);
dvfs_core_data.reg_id = "SW1A";
tve_data.dac_reg = "VDAC";
bus_freq_data.gp_reg_id = "SW1A";
bus_freq_data.lp_reg_id = "SW2";
mxc_register_device(&mxc_powerkey_device, &pwrkey_data);
}
.....................
}
Please modify your code according to above.
Regards,
Weidong