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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 7, 2014, at 1:21 AM, Warner Losh wrote: >=20 > On Feb 6, 2014, at 11:53 AM, Luiz Otavio O Souza wrote: [=85] >>=20 >> gpioiic(4) devices can be described in DTS as follow: >>=20 >> gpio { >>=20 >> gpioiic { >> compatible =3D "gpioiic"; >=20 > Linux uses 'i2c-gpio' here. Can we follow that standard rather than = invent our own? Or at least support both? Sure, no problem. >=20 >> gpios =3D <&gpio 17 2 0 >> &gpio 21 2 0>; >> scl =3D <0>; >> sda =3D <1>; >=20 > 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=85 They are optional and only needed when you want to change the default = setting (scl =3D 0 and sda =3D 1 - yes, in this example they are just a = no op). >=20 > In addition, you'll often see things like: >=20 > i2c-gpio,sda-open-drain; > i2c-gpio,scl-open-drain; > i2c-gpio,delay-us =3D <2>; >=20 > 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. >=20 > 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... >=20 >> lm750 { >> compatible =3D "lm75"; >> i2c-address =3D <0x4b>; >> }; >> lm751 { >> compatible =3D "lm75"; >> i2c-address =3D <0x4f>; >> }; >> }; >> }; I see. I found a DTS from Atmel and i=92ll add support for that. Thank you for point that out. Luiz=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9090D088-8F3C-494F-8F41-AA8A16361CB2>