Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 May 2010 21:39:34 +0200
From:      Andreas Tobler <andreast-list@fgznet.ch>
To:        Rafal Jaworowski <raj@semihalf.com>
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: iic/i2c debugging on PowerMac
Message-ID:  <4BF58FF6.4050202@fgznet.ch>
In-Reply-To: <C2885CB4-252F-4354-8BF3-3865C5CCD63E@semihalf.com>
References:  <4BF58342.7010707@fgznet.ch> <C2885CB4-252F-4354-8BF3-3865C5CCD63E@semihalf.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 20.05.10 21:16, Rafal Jaworowski wrote:
>
> On 2010-05-20, at 20:45, Andreas Tobler wrote:
>
>> Hi,
>>
>> I'm trying to access (read/write) an i2c device on my G5. The
>> problem is, I do not know the right i2c address although I have it
>> from the device-tree, it's 0x15e.
>>
>> I read about the i2c utilitiy which requires the iic driver
>> compiled into the kernel. Done that and it seems it is there:
>>
>> unin0 iichb0 pnpinfo name=i2c compat=keywest-i2c iicbus0 iic0 at
>> addr=0 fcu0 pnpinfo name=fan compat=fcu at addr=0x15e
>>
>> But I do not have this device entry in /dev. Trying to create one
>> does not work. mknod /dev/iic0 c 103 0 mknod: /dev/iic0: No such
>> file or directory
>>
>> This is a netboot environment, might this be the cause of not being
>> able to create the device? Or do I have another issue?
>
> This shouldn't be related to the boot method.
>
> Do you see any failure output during iic attach (there should be a
> diag error)? If not try to intstrument the iic_probe() routine and
> see what happens.

unin0: <Apple UniNorth System Controller> on nexus0
unin0: Version 179
iichb0: <Keywest I2C controller> mem 0xf8001000-0xf8001fff irq 42 on unin0
iichb0: [ITHREAD]
iicbus0: <OFW I2C bus> on iichb0
iicbus0: iic identify
iic0: iic probe failure
iic0: addr: 0x8a
iicbus0: <unknown card> at addr 0
iic1: iic probe failure
iic1: addr: 0x8a

The same on this one:

iichb1: <Keywest I2C controller> mem 0x18000-0x18fff irq 282 on macio0
iichb1: [ITHREAD]
iicbus1: <OFW I2C bus> on iichb1
iicbus1: iic identify
iic1: iic probe failure
iic1: addr: 0x8a
iicbus1: <unknown card> at addr 0

Hm, I suspect that either the kiic has an issue or the iicbus_get_addr 
function is not working properly.

Thanks for the hint, Rafal!

Andreas



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BF58FF6.4050202>