public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peng Fan <B51431@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed
Date: Sat, 1 Nov 2014 08:01:52 +0800	[thread overview]
Message-ID: <545422F0.7080505@freescale.com> (raw)
In-Reply-To: <CAOMZO5Aw4Ui83fgrZaOd21cmnsJ+TV0UubEqTq2Z59Xb53ZTYw@mail.gmail.com>



On 10/31/2014 08:01 PM, Fabio Estevam wrote:
> On Fri, Oct 31, 2014 at 1:08 AM, Peng Fan <Peng.Fan@freescale.com> wrote:
>> The PFUZ probe failed with the following msg:
>> " wait_for_sr_state: failed sr=81 cr=a0 state=2020
>>   i2c_init_transfer: failed for chip 0x8 retry=0
>>   wait_for_sr_state: failed sr=81 cr=a0 state=2020
>>   i2c_init_transfer: failed for chip 0x8 retry=1
>>   wait_for_sr_state: failed sr=81 cr=a0 state=2020
>>   i2c_init_transfer: failed for chip 0x8 retry=2
>>   i2c_init_transfer: give up i2c_regs=021a0000
>>   Can't find PMIC:PFUZE100 "
>>
>> board_early_init_f is too early to call i2c related setting, because
>> init_func_i2c is called after board_early_init_f being invoked. Thus
>> move setup_i2c into board_init.
>>
>> Also PFUZ is connected to I2C bus 0, so change "1" -> "0".
>>
>> Using this patch PFUZ can be correctly probed:
>> "PMIC:  PFUZE100 ID=0x11"
>>
>> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> 
> Maybe this is a difference between RevA versus RevB board?

I checked SCH-27962 REV A and SCH-27962 REV B. There is no different to I2C part. PMIC is connected to the first I2C bus. You can check page 22.

> 
> I have a RevA and PMIC works fine here:
I tried on RevA and RevB. Both can not work.
The following is the msg on RevA:

U-Boot 2014.10-00435-g571bdf1 (Nov 01 2014 - 07:39:47)

CPU:   Freescale i.MX6SX rev1.0 at 792 MHz
Reset cause: POR
Board: MX6SX SABRE SDB
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
wait_for_sr_state: failed sr=81 cr=a0 state=2020
i2c_init_transfer: failed for chip 0x8 retry=0
wait_for_sr_state: failed sr=81 cr=a0 state=2020
i2c_init_transfer: failed for chip 0x8 retry=1
wait_for_sr_state: failed sr=81 cr=a0 state=2020
i2c_init_transfer: failed for chip 0x8 retry=2
i2c_init_transfer: give up i2c_regs=021a0000
Can't find PMIC:PFUZE100
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0

After applying this patch, all is fine. I am not sure whether your board has been reworked. But PMIC is connected to the first I2C bus, thus I think setup_i2c(0,xxxx) is correct, but not setup_i2c(1,xxx). And I think it is too early to call setup_i2c in board_early_init_f.

> 
> U-Boot 2014.10-rc2-17115-g718b923 (Sep 30 2014 - 14:03:24)
> 
> CPU:   Freescale i.MX6SX rev1.0 at 792 MHz
> Reset cause: WDOG
> Board: MX6SX SABRE SDB
> I2C:   ready
> DRAM:  1 GiB
> MMC:   FSL_SDHC: 0
> In:    serial
> Out:   serial
> Err:   serial
> PMIC:  PFUZE100 ID=0x10
> Net:   FEC [PRIME]
> Hit any key to stop autoboot:  0
> =>
> 
> => pmic PFUZE100 dump
> PMIC: PFUZE100
> 
> 0x00: 00000010 00000000 00000000 00000021 00000000 00000001 0000003f 00000001
> 0x08: 00000000 0000007f 00000000 00000000 00000000 00000000 00000000 00000081
> 0x10: 00000000 00000000 0000003f 00000000 00000000 00000000 00000000 00000000
> 0x18: 00000000 00000000 00000000 00000010 00000000 00000000 00000000 00000000
> 0x20: 0000002b 0000001b 0000002b 00000008 00000044 00000000 00000000 00000000
> 0x28: 00000000 00000000 00000000 00000000 00000000 00000000 0000002b 0000001b
> 0x30: 0000002b 00000008 00000044 00000000 00000000 00000072 00000072 00000072
> 0x38: 00000008 00000054 00000000 00000000 00000026 00000026 00000026 00000008
> 0x40: 00000064 00000000 00000000 00000026 00000026 00000026 00000008 00000064
> 0x48: 00000000 00000000 00000038 00000038 00000038 00000008 00000074 00000000
> 0x50: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 0x58: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 0x60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 0x68: 00000000 00000000 00000010 00000006 00000018 0000000e 0000001a 00000010
> 0x70: 0000001f 0000001c 00000000 00000000 00000000 00000000 00000000 00000000
> 0x78: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> =>
> 

  reply	other threads:[~2014-11-01  0:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31  3:08 [U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed Peng Fan
2014-10-31 12:01 ` Fabio Estevam
2014-11-01  0:01   ` Peng Fan [this message]
2014-11-01  0:16     ` Fabio Estevam
2014-11-01  0:16 ` Fabio Estevam
2014-11-16 11:42   ` Peng Fan
2014-11-17 12:24     ` Stefano Babic
2014-11-20  9:33 ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545422F0.7080505@freescale.com \
    --to=b51431@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox