EIM_DATA23 is special?

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

EIM_DATA23 is special?

Jump to solution
1,453 Views
johnhuang808
Contributor II

I created my ownboard based on IMX6Q. I use BSP 13.4.1

from Freescale.

 

As I saw in the code:

 

static struct max8903_pdata charger1_data = {

    .dok = SABRESD_CHARGE_DOK_B,

    .uok = SABRESD_CHARGE_UOK_B,

    .chg = SABRESD_CHARGE_CHG_1_B,

    .flt = SABRESD_CHARGE_FLT_1_B,

    .dcm_always_high = true,

    .dc_valid = true,

    .usb_valid = true,

};

 

That max8903 use SABRESD_CHARGE_CHG_1_B

(IMX_GPIO_NR(3, 23)) as charger status pin. But on my

board, i used this pin for another purpose (i don't have

max8903 on my board). But when i changed IMX_GPIO_NR(3,

23) to output to adapt my own purpose, kernel stoping.

 

So i assume that in the kernel booting process, kernel check

the value of this GPIO pin. I disable all items related to

max8903 in imx6_android_defconfig. But kernel still stoping.

 

So i have a question, how can i use IMX_GPIO_NR(3,23) for

my own purpose.

Original Attachment has been moved to: log-console.txt.zip

Tags (3)
0 Kudos
1 Solution
1,230 Views
raymondwang
Senior Contributor I

I think so ,too. All gpio pins in default is input with internal pullup. And after your change it to output,its default state is low output. And with your test result,  EIM_DATA23 pin

different level can affect system boot.

View solution in original post

0 Kudos
8 Replies
1,230 Views
raymondwang
Senior Contributor I

From your kernel console log, your kernel command line has big difference to sabresd default:

Kernel command line: console=ttymxc2,115200 init=/init androidboot.console=ttymxc2,115200 androidboot.hardware=freescale

   I give you my command line,please check with yours.

console=ttymxc0,115200 init=/init video=mxcfb0:dev=mipi_dsi video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base=0x27b00000 vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale enable_wait_mode=off

0 Kudos
1,230 Views
johnhuang808
Contributor II

Hi raymond,

Just tried your recommend command line with my board, the new console log as bellow:

.....

kernel   @ 10808000 (4017368)

ramdisk  @ 11800000 (167488)

kernel cmdline:

        use boot.img command line:

        console=ttymxc2,115200 init=/init video=mxcfb0:dev=mipi_dsi video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base=0x27b00000 vmalloc=400M androidboot

Starting kernel ...

An the result is still the same, kernel still stop at here:

print_constraints: dummy:

NET: Registered protocol family 16

print_constraints: vddpu: 725 <--> 1300 mV at 700 mV fast normal

print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal

print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal

print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal

print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal

(stop here)

0 Kudos
1,230 Views
raymondwang
Senior Contributor I

Wow,

If you think this issue may be caused by MAX8903 driver,you can disable it then try again.

//platform_device_register(&sabresd_max8903_charger_1);

0 Kudos
1,230 Views
johnhuang808
Contributor II

Raymond,

Thanks for your recommend, i also tried:

1. In board-mx6q_sabresd.c, i put the following line into comment:

//platform_device_register(&sabresd_max8903_charger_1);

2. In config file imx6_android_defconfig, i comment everyline that realted to max8903 and fec.

And after all changes above, the result is still as in my consle log that i attached T_T

0 Kudos
1,230 Views
raymondwang
Senior Contributor I

Does your hardware has big difference to sabresd one?

Meanwhile, my kernel config file is mx6q_sabresd_android_config but not yours imx6_android_defconfig.

please check your board config file in device/fsl/sabresd-6dq/BoardConfig.mk. The following line is default sabresd config file.

TARGET_BOOTLOADER_CONFIG := 6q:mx6q_sabresd_android_config 6dl:mx6dl_sabresd_android_config

  Also,you can comment out below lines:

  #if 0

ret = gpio_request(SABRESD_PFUZE_INT, "pFUZE-int");

  if (ret) {

  printk(KERN_ERR"request pFUZE-int error!!\n");

  return;

  } else {

  gpio_direction_input(SABRESD_PFUZE_INT);

  mx6q_sabresd_init_pfuze100(SABRESD_PFUZE_INT);

  }

endif

This will let cpu run LDO_MODE_DEFAULT mode(If PMIC PFUZE found,it will run at LDO_MODE_BYPASSED mode).

  If all retries with failure, hardware engineer should check all MX6 power supply.

1,230 Views
johnhuang808
Contributor II

Raymond,

I comment out lines as you recommend above. And the result still the same. After that, i tried to change EIM_DATA23 pin (change to output) on SabreSD (i also have SabreSD board), and the result that SabreSD boot fine. So the issuse come from our hardware. I am checking and finding out errors.

0 Kudos
1,231 Views
raymondwang
Senior Contributor I

I think so ,too. All gpio pins in default is input with internal pullup. And after your change it to output,its default state is low output. And with your test result,  EIM_DATA23 pin

different level can affect system boot.

0 Kudos
1,230 Views
johnhuang808
Contributor II

I found the error. When EIM_DATA23 changed to output and set value to 1, this condition will trigger one of load swtichs on my board. Because some problem on my load, it cause decrease input voltage level on PMIC, PMIC reset, and it is the reason that stop the kernel. And EIM_DATA23 is no special, now i can control this pin easily.

Thanks Raymond for your follow up ^^

0 Kudos