Re: [U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed
On 31/10/2014 04:08, Peng Fan 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=021a 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@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed
Hi Peng, On 16/11/2014 12:42, Peng Fan wrote: 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@freescale.com Acked-by: Fabio Estevam fabio.este...@freescale.com Patch is ok for me, too. Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed
Hi Stefano, Would you please help reviewing this patch? On 11/1/2014 8:16 AM, Fabio Estevam wrote: On Fri, Oct 31, 2014 at 1:08 AM, Peng Fan peng@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=021a 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@freescale.com Acked-by: Fabio Estevam fabio.este...@freescale.com Regards, Peng. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed
On Fri, Oct 31, 2014 at 1:08 AM, Peng Fan peng@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=021a 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@freescale.com Maybe this is a difference between RevA versus RevB board? I have a RevA and PMIC works fine here: 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: 0010 0021 0001 003f 0001 0x08: 007f 0081 0x10: 003f 0x18: 0010 0x20: 002b 001b 002b 0008 0044 0x28: 002b 001b 0x30: 002b 0008 0044 0072 0072 0072 0x38: 0008 0054 0026 0026 0026 0008 0x40: 0064 0026 0026 0026 0008 0064 0x48: 0038 0038 0038 0008 0074 0x50: 0x58: 0x60: 0x68: 0010 0006 0018 000e 001a 0010 0x70: 001f 001c 0x78: = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed
On 10/31/2014 08:01 PM, Fabio Estevam wrote: On Fri, Oct 31, 2014 at 1:08 AM, Peng Fan peng@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=021a 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@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=021a 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,) 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: 0010 0021 0001 003f 0001 0x08: 007f 0081 0x10: 003f 0x18: 0010 0x20: 002b 001b 002b 0008 0044 0x28: 002b 001b 0x30: 002b 0008 0044 0072 0072 0072 0x38: 0008 0054 0026 0026 0026 0008 0x40: 0064 0026 0026 0026 0008 0064 0x48: 0038 0038 0038 0008 0074 0x50: 0x58: 0x60: 0x68: 0010 0006 0018 000e 001a 0010 0x70: 001f 001c 0x78: = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed
On Fri, Oct 31, 2014 at 10:01 PM, Peng Fan b51...@freescale.com wrote: On 10/31/2014 08:01 PM, Fabio Estevam wrote: On Fri, Oct 31, 2014 at 1:08 AM, Peng Fan peng@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=021a 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@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. You are right. I was surprised that PMIC was working originally. I tested your change and it also works fine here. Thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed
On Fri, Oct 31, 2014 at 1:08 AM, Peng Fan peng@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=021a 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@freescale.com Acked-by: Fabio Estevam fabio.este...@freescale.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] imx:mx6sxsabresd fix pfuz probe failed
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=021a 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@freescale.com --- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 68d3718..256ea29 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -243,7 +243,6 @@ int board_phy_config(struct phy_device *phydev) int board_early_init_f(void) { setup_iomux_uart(); - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, i2c_pad_info1); /* Enable PERI_3V3, which is used by SD2, ENET, LVDS, BT */ imx_iomux_v3_setup_multiple_pads(peri_3v3_pads, @@ -277,6 +276,10 @@ int board_init(void) /* Address of boot parameters */ gd-bd-bi_boot_params = PHYS_SDRAM + 0x100; +#ifdef CONFIG_SYS_I2C_MXC + setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, i2c_pad_info1); +#endif + return 0; } -- 1.8.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot