[U-Boot] i2c_set_bus_num freeze

Ran Shalit ranshalit at gmail.com
Fri Jan 27 06:30:40 CET 2017


On Jan 27, 2017 1:20 AM, "Adam Ford" <aford173 at gmail.com> wrote:
>
>
>
> On Jan 26, 2017 11:44 AM, "Ran Shalit" <ranshalit at gmail.com> wrote:
>>
>> Hello,
>>
>> I have some issue in u-boot trying to access bus #1.
>>
>> I can access bus #0, #2 with i2c dev 0/2
>>
>> I can also access bus #0,1,2 from linux.
>>
>> But on trying to access i2c #1 in u-boot in hangs:
>>
>> The function i2c_set_bus_num get stuck .
>>
>>
>> ret = i2c_set_bus_num(1);
>>
>> <<------- never gets here .........
>>  if (ret)
>>      printf("Failure changing bus number (%d)\n", ret);
>>
>> It hangs in i2c_set_bus_num->i2c_init->
>>
>> ......
>>
>>     printf("i2c_init 8\n");
>>
>> bus_initialized[current_bus] = 1;
>> if (readw (I2C_CON) & I2C_CON_EN) {
>> writew (0, I2C_CON);
>> udelay (50000);
>> }
>>
>> writew(psc, I2C_PSC);
>> writew(scll, I2C_SCLL);
>> writew(sclh, I2C_SCLH);
>>
>> /* own address */
>> writew (slaveadd, I2C_OA);
>> writew (I2C_CON_EN, I2C_CON);
>>
>>     printf("i2c_init 9\n");  <<------ never get printed
..................
>>
>> I have seen a similar question, yet I am doing this access after u-boot
>> complete, and command prompt.
>>
>> Is anyone familiar with this ?
>>
>>
>> What platform are you using?

I am using dm8148 TI.
I suspected pinmux but it seems to be ok and it is the same pinmux used in
linux. In linux access to i2c 0,1,2 works without issues.

>
>
>
>> Regards,
>>
>> Ran
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>
>


More information about the U-Boot mailing list