Re: Usage of i2c_-Tools in Barebox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Tue, May 05, 2015 at 05:54:50PM +0200, Sascha Hauer wrote:
> On Tue, May 05, 2015 at 04:56:10PM +0200, Marcel Behlau wrote:
> > i'm using a phyFLEX-i.MX6 SBC and want to communicate with an
> > external µC over I2C. I only want to read/set 1 register, so i tried
> > to use the builtin i2c_read and i2c_write-Commands. The µC is
> > connected to i2c-bus 1 of the device, so i tried to probe the hole
> > bus with "i2c_bus 1 3 30". The command only answered with
> > "i2c_probe: No such device". I tried also the busses 0-3, with the
> > same result. I searched in the board.c sourcecode of the phyflex,
> > but couldn't find i2c related stuff, so i think, i have to add the
> > initalisation for the i2c.
> > 
> > Do i have to add the i2c-init in the boards/phytec-pfla02/board.c
> > -file? Is there some documenation about this stuff?
> 
> The phyFLEX board is device tree based. You have to enable the i2c
> controller in the dts file (same as you would do in the kernel).
> Usually a:
> 
> &i2c0 {
> 	status = "okay";
> };
> 
> Should be enough. You probably also have to add the proper pinctrl node.
and enable the i2c driver. You might want to check the output of
devinfo.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux