Re: Bitbanging i2c bus driver using the GPIO API

Lennart Sorensen
2007-04-27T18:53:33Z

On Fri, Apr 27, 2007 at 08:49:49AM -0600, Jordan Crouse wrote:
> This is getting confusing... :) On the sc1200 and and GX1, the ACB
> bus is accessed through ISA ports. There is no ISA on the cs5535/cs5536
> companion chips (accompanying the GX and LX processors), and the ACB
> is accessed through PCI. All the platforms have LPC, but that really
> doesn't matter for the purposes of this discussion.
>
> The silicon block that implements the ACB has been generally unchanged
> over the last 6 or 7 years, so the same driver should support any of
> the platforms, assuming one can invoke the magic spells to get at the
> hardware. Jean and I have been concentrating most of our effort on
> getting the GX and LX to work through PCI, and really haven't concentrated
> our efforts on the older processors. Thats not to say it won't work,
> but its probably not plug and play.

Well the SC1200 has an ACB but it is disabled by default through one of
the gpio multiplex selector bits. According to the data sheet only the
bios knows where that is. So instead the gpio's (12 and 13) that are
multiplexed with acb #2 are driven by scx200_i2c using the bit banged
interface. Makes it work for those of us that don't have access to
changing the bios.

Unfortuantely I don't think the scx200 gpio's have been rewritten to use
the new gpio interface. If it was I would try to see if the new i2c
driver would work if told to use gpio 12 and 13.

scx200_i2c does depend on i2c-algo-bit so there is really very little
code inside scx200_i2c itself. Does the new driver replace
i2c-algo-bit as well or does it use it?

--
Len Sorensen