Date: Tue, 11 Feb 2014 17:10:05 -0200 From: Luiz Otavio O Souza <loos.br@gmail.com> To: Warner Losh <imp@bsdimp.com> Cc: freebsd-arm@freebsd.org, freebsd-embedded@freebsd.org Subject: Re: FDT/OFW GPIO bus Message-ID: <9090D088-8F3C-494F-8F41-AA8A16361CB2@gmail.com> In-Reply-To: <C8E49E48-F575-466F-8036-8E57CC025ADE@bsdimp.com> References: <2D5F2707-FD55-46BB-A44F-8870B48E2BB1@gmail.com> <C8E49E48-F575-466F-8036-8E57CC025ADE@bsdimp.com>
index | next in thread | previous in thread | raw e-mail
On Feb 7, 2014, at 1:21 AM, Warner Losh wrote:
>
> On Feb 6, 2014, at 11:53 AM, Luiz Otavio O Souza wrote:
[…]
>>
>> gpioiic(4) devices can be described in DTS as follow:
>>
>> gpio {
>>
>> gpioiic {
>> compatible = "gpioiic";
>
> Linux uses 'i2c-gpio' here. Can we follow that standard rather than invent our own? Or at least support both?
Sure, no problem.
>
>> gpios = <&gpio 17 2 0
>> &gpio 21 2 0>;
>> scl = <0>;
>> sda = <1>;
>
> Linux doesn't have these at all, it seems, since they are implicit in the gpios property. It would be ideal if the scl and sda properties were optional…
They are optional and only needed when you want to change the default setting (scl = 0 and sda = 1 - yes, in this example they are just a no op).
>
> In addition, you'll often see things like:
>
> i2c-gpio,sda-open-drain;
> i2c-gpio,scl-open-drain;
> i2c-gpio,delay-us = <2>;
>
> as well. These should be easy enough to add and shouldn't gate things.
Right, ATM gpioiic(4) is coded as an open collector/drain for both SCL and SDA as per standard. The delay option should be added.
>
> There's also many DTS files that don't have this as a direct child of gpio... But that's not strictly required. I'll cope with adding support for that when I get the Atmel stuff working...
>
>> lm750 {
>> compatible = "lm75";
>> i2c-address = <0x4b>;
>> };
>> lm751 {
>> compatible = "lm75";
>> i2c-address = <0x4f>;
>> };
>> };
>> };
I see. I found a DTS from Atmel and i’ll add support for that.
Thank you for point that out.
Luiz
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9090D088-8F3C-494F-8F41-AA8A16361CB2>
