From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 06 May 2014 10:07:48 +0200 Subject: [U-Boot] [PATCH] mx6sabred: Add PFUZE100 PMIC support In-Reply-To: References: <1399230898-25722-1-git-send-email-festevam@gmail.com> <5367A02D.5080809@denx.de> Message-ID: <53689854.9070904@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Fabio, On 05/05/2014 18:08, Fabio Estevam wrote: > On Mon, May 5, 2014 at 12:56 PM, Fabio Estevam wrote: >> On Mon, May 5, 2014 at 12:32 PM, Tim Harvey wrote: >> >>> Hi Fabio, >>> >>> Yes, I think Stefano is correct in that power_init_board() is the >>> right place to put pmic init. He asked me to do that to my recent >>> series as well and it worked fine. Note that in that series I do have >>> a patch that will rename pmic_init() for the PFUZE100 to >>> power_pfuze100_init() [1]. I'm hoping that will make it in soon. >> >> Thanks, Tim. >> >> Stefano, >> >> It seems that I need to wait for Tim's series to be applied, otherwise >> there will be a build breakage. > > In the meantime I converted the current patch to using > power_init_board() instead, but this causes problems: > > => pmic list > PMIC devices: > name: PFUZE100_PMIC bus: I2C_1 > => pmic PFUZE100_PMIC dump > PMIC: PFUZE100_PMIC > 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 > PMIC: Registers dump failed > > With the previous misc_init_r() approach the 'dump' command worked correctly. > > Any suggestions? > Checkin in arch/arm/lib/board.c, I see that power_init_board() is called quite early (that makes sense, as power can be necessary to go on). Can you try moving power_init_board() later ? Anyway, I2C is already set (by board_init, called previously) and malloc is also available. Regards, Stefano -- ===================================================================== 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: sbabic at denx.de =====================================================================