start kernel error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

start kernel error

Jump to solution
23,218 Views
caohaifeng
Contributor IV

你好,USB部分的原理图参见mx53QSB-R第7页,问题描述如下。

USB原理图仅去掉了micro-B部分,其他部分保留。如图

4452_4452.png1.png

当USB_PWREN变成高电平时,板子的FAULT灯亮起,启动信息请见console information_1。如果在EXT_USB5V上外接5V电源,则该部分启动可以顺利通过。启动信息请见console information.我在定义板中没有启用OTG功能,怎么会影响到USB_H1? 另外,请注意console information中最后出现的错误信息mmc0: error -110 whilst initialising SD card ,怎么解决?

 

海峰

Translation:  For the schematics of USB, please refer to page 7 of mx53QSB-R. The description of the problem is below. The micro-B has been removed from the USB schematics. Rest portion is same. Please refer to the schematics.

When USB_PWREN is high, FAULTlight is on. For boot information please refer to console information_1.If 5V is connected from an external power supply, booting is fine. Please refer to console information for boot information. Why will it impact USB_H1, as OTG has not been enabled? Please note that error message on the bottom of console information "mmc0: error -110 whilst initialising SD card". Is there fix available?

Original Attachment has been moved to: console-information.zip

Original Attachment has been moved to: console-information_1.zip

Labels (2)
0 Kudos
1 Solution
22,293 Views
weidong_sun
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
18 Replies
22,292 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi, Haifeng,

     把你的图纸发给我,看看!

伟东

---------------------------English-------------------

Please send your schematic to me , let me see .

Weidong

0 Kudos
22,293 Views
caohaifeng
Contributor IV

你好伟东,

请参考coreboard.pdf的第7页和 mainboard.pdf的第7页。

海峰

------------------------English---------------------

Hello,Weidong

    Please refer to page7 of coreboard.pdf and page7 of mainboard.pdf.

Haifeng

0 Kudos
22,292 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi, Haifeng,

       你的USB OTG设计方式,是只做device使用。既然这样的话,那么USB_OTG_ID脚需要探测,因为做device的时候,ID脚做了3.3K拉低,控制会通过这一点知道它工作在device状态。因此,你要再驱动里选上OTG ID detect。

伟东

--------------------------English-------------------------

Hi,Hifeng,

     According to your design, USB OTG can only be used as a device. so you should select USB_OTG_DETECT in linux kernel, When USB OTG acts a device, ID pin should be pulled down.(such as using a 3.3k-resistor).

     Please try to select it in kernel configuration.

Weidong

0 Kudos
22,292 Views
caohaifeng
Contributor IV

你好伟东,我测试后问题依旧。IMX53QSB-R原理图中只是多了一个EXT_5V的电源而已,即usb_h1_vdda33和usb_otg_vdda33的电源都是通过USB线连接PC机usb口才可以产生。但在IMX53QSB-R板上启动内核,并没有在hub 2-0这个阶段出现错误啊,求解。

海峰

Translation: The problem still exists after testing. There is only EXT_5V added in the schematics of IMX53QSB-R, i.e. usb_h1_vdda33 and usb_otg_vdda33 are connected by PC through USB. But in core of IMX53QSB-R, no hub 2-0 error happens duing this period.

0 Kudos
22,292 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,Haifeng,

      如果你的USB HOST和OTG使用的3.3V,都是来自外部5V供电,并由MC34708输出的3V3_VUSB的话,说明你使用了MC34708里面的USB LDO,这个LDO有2个输入,1个是EXT_5V(这个需要你插USB线),1个是5V适配器。那么究竟使用哪个输入呢,需要对MC34708的寄存器配置,在原始代码中,应该是启动后,已经切换到了5V适配器输入。那么即使你不插USB OTG 线,3V3_VUSB也应该会加在USB HOST和OTG控制器电源端。

       因此,我怀疑是不是你的板子在LINUX启动时,仍然没有初始化MC34708。也就是说,log里,你看不到初始化输出的那些电源电压的大小。

伟东

Translation: If both of USB HOS and OTG are 3.3V and from external supplies, and 3V3_VUSB is from MC34708, USB LDO is used. This LDO has two inputs, one EXT_5V (USB connection is needed) and the other 5V from adaptor. Which one is used will be decided by configuration of MC34708's registers. In source code, it should swich to 5V adaptor after initialization. 3V3_VUSB will appeare on power pins of USB HOST and OTG, even though USB OTG is not connected.

Therefor, I guess that MC34708 does not get initialized during booting up. That means there is no output voltages changing during initialization in log file.

0 Kudos
22,293 Views
caohaifeng
Contributor IV

Hi,weidong,

正解。log里的确还没有出现初始化输出的那些电压,该怎么改动呢?

附上我修改的文件供参考。

海峰

Translation: There is no those voltages output durng initialization. How do I make changes? Attached is the reference with my changes.

0 Kudos
22,293 Views
weidong_sun
NXP TechSupport
NXP TechSupport

海峰,

     这个问题,我几天前在你的另一个标题里回复了,是不是你没看到。

     应该是linux/drivers/mxc/pmic/core/pmic_core_i2c.c中,你稍作一下修改,看你遇到的问题,可能是I2C总线上,没有找到MC34708。这样改一下:

static int __devinit pmic_probe(struct i2c_client *client,
    const struct i2c_device_id *id)
{
int ret = 0;
int pmic_irq;
struct pmic_platform_data *plat_data = client->dev.platform_data;
const char *name="mc34708";
int pmic_index;

/* ret = is_chip_onboard(client);
if (ret == -1)
  return -ENODEV;

name = get_chipname(client);*/

if (!name)

  return PMIC_ERROR;

....

------------------------------------------Egnlish---------------------------------

Hello,Haifeng,

     I have replied this issue several days ago, Probably you didn't notice it . you can do a little adjustment in file:

linux/drivers/mxc/pmic/core/pmic_core_i2c.c, see following:

static int __devinit pmic_probe(struct i2c_client *client,
    const struct i2c_device_id *id)
{
int ret = 0;
int pmic_irq;
struct pmic_platform_data *plat_data = client->dev.platform_data;
const char *name="mc34708";
int pmic_index;

/* ret = is_chip_onboard(client);
if (ret == -1)
  return -ENODEV;

name = get_chipname(client);*/

if (!name)

  return PMIC_ERROR;

....

Weidong

0 Kudos
22,293 Views
caohaifeng
Contributor IV

你好伟东,

pmic_core_i2c.c的文件我修改了,另外在mx53_znjt.c中修改了i2c

[Translatio]: I made changes in pmic_core_i2c.c, and changed i2c in mx53_znjt.c.


static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {
{
.type = "mc34708",
.addr = 0x1C,
  },
};

static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {

{

.type = "mc34708",

.addr = 0x1C,

  },

};

运行时提示如下 [Translation]: It shows below information when runnng.

24bit read error, ret = -5                                                     
mc34708 Rev 0.0 FinVer 0 detected                                              
24bit write error, ret = -5  

pmic: probe of 0-001c failed with error -1

cpu与mc34708之间的i2c使用的和qsb-r一样。I2C1上的两个10k上拉电阻没有焊接,不过reference manual的Table 4-2显示,I2C1_SCL内部下拉,I2C1_SDA内部上拉。我印象中I2C通信都要加上拉电阻,和这个有关吗?

[该部分可以忽略,已检查u-boot中把i2c1配置成内部100k上拉了]

[Translation]: i2C between cpu and mc34708 is used in the same way as qsb-r. two 10k pull-up resistors are not used on I2C1. In Table 4-2, I2C1_SCL is pull-down and I2C1_SDA is pull-up. I have impression that all resistors are pull-up. Does it have nothing to do with?

海峰

0 Kudos
22,293 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi, Haifeng,

     I2C address of mc34708 is 0x08 , why did you use 0x1c ? :smileysad:

     In additions, Please issue your quesion on community in English !
Weidong

0 Kudos
22,293 Views
caohaifeng
Contributor IV

Hi,weidong,

Sorry for my fault. When I changed i2c address of mc34708 to 0x08, error is :

mc34708 Rev 2.4 FinVer 0 detected                                        

pmic: probe of 0-0008 failed with error -1


The attachment is start kernel log.Can you check my file sticked in the above?


Reagrds,

Haifeng

0 Kudos
22,293 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,Hifeng,

     Send your BSP file : mx53_xxx.c / mc53_xxx_pmic_mc34708.c to me . Let me modify it for you .

     weidong.sun@freescale.com

Weidong

0 Kudos
22,294 Views
weidong_sun
NXP TechSupport
NXP TechSupport

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

0 Kudos
22,293 Views
caohaifeng
Contributor IV

Hi,weidong,

Thank you for your patient reply. It works now, usb_h1_vdda33 is 3.3V. by the way, it seems that we should define mc34708_int first.iomux_v3_cfg_t mc34708_int = MX53_PAD_CSI0_DAT5__GPIO5_23


To be sure, If i add usb init function in static void __init mxc_board_init(void){ }

mx5_usb_dr_init();

mx5_set_host1_vbus_func(mx53_znjt_usbh1_vbus);

mx5_usbh1_init();

the process of start kernel will stop at usb init. it was mentioned above.

The USB_H1_VBUS voltage is only about 2.5V, but it should be 5V.

What's wrong?


Reagrds,

Haifeng

0 Kudos
22,293 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Haifeng,

     mx5_set_host1_vbus_func(mx53_znjt_usbh1_vbus); I don't konw what your purpose of adding this function is . mx5_usb_dr_init() is for USB OTG to work as dual role ( device or host) , mx5_usbh1_init() is for usb host1 initilization.

    Now, Is your system normal ?

weidong

22,293 Views
caohaifeng
Contributor IV

Hi,weidong,

I get my bsp files from copying mx53_loco.Obviously I can't really understand the bsp files.

I delete the mx5_set_host1_vbus_func(mx53_znjt_usbh1_vbus) , so it works.

Can you check my log information and tell me where should be modified?By the way ,I can't login into the system when I input "root",

it has no response.

The dicussion about i2c and usb is end ,should I close this topic and make a new dicussion?

Reagrds,

Haifeng

0 Kudos
22,293 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Ok, Haifeng,

      Please re-create a topic on community if you have other questions !

Regards,

Weidong

0 Kudos
22,293 Views
admin
Specialist II

weidong.sun or YixingKong, can one of you translate and post a summary of the discussion for the benefit of those of us who are Chinese-language challenged.  :smileyconfused:

Thanks.

0 Kudos
22,293 Views
caohaifeng
Contributor IV

你好伟东,感谢你回复的这么快速,我试一试。

---------------------------------------------------------------

Hello,weidong,

       Thank you for your quick reply. Let me try .

0 Kudos