2012-08-13 10:04:17

by Sourav Poddar

[permalink] [raw]
Subject: [PATCHv2 0/4] Add device tree data for omap5

The following patch series add i2c support for omap5.
As well as enable I2C based devices like pressure and temperature
through device tree. Also add onchip keypad dts data.

Cc: Benoit Cousson <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Santosh Shilimkar <[email protected]>

Sourav Poddar (4):
arm/dts: omap5-evm: Add I2C support
arm/dts: omap5-evm: Add tmp102 sensor support
arm/dts: omap5-evm: Add keypad data
arm/dts: omap5-evm: Add bmp085 sensor support

arch/arm/boot/dts/omap5-evm.dts | 30 +++++++++++++++++++++++++++++
arch/arm/boot/dts/omap5.dtsi | 40 +++++++++++++++++++++++++++++++++++++++
2 files changed, 70 insertions(+), 0 deletions(-)


2012-08-13 10:04:19

by Sourav Poddar

[permalink] [raw]
Subject: [PATCHv2 2/4] arm/dts: omap5-evm: Add tmp102 sensor support

Add tmp102 temperature sensor data in omap5 evm dts file.

Tested on omap5430 evm with 3.5 custom kernel.

Cc: Benoit Cousson <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Sourav Poddar <[email protected]>
---
arch/arm/boot/dts/omap5-evm.dts | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts
index 200c39a..45a8aeb 100644
--- a/arch/arm/boot/dts/omap5-evm.dts
+++ b/arch/arm/boot/dts/omap5-evm.dts
@@ -18,3 +18,12 @@
reg = <0x80000000 0x40000000>; /* 1 GB */
};
};
+
+&i2c4 {
+ clock-frequency = <400000>;
+
+ tmp102@48{
+ compatible = "ti,tmp102";
+ reg = <0x48>;
+ };
+};
--
1.7.1

2012-08-13 10:04:20

by Sourav Poddar

[permalink] [raw]
Subject: [PATCH 4/4] arm/dts: omap5-evm: Add bmp085 sensor support

Add bmp085 pressure sensor data in omap5 evm dts file.

Tested on omap5430 evm with 3.5 custom kernel.

Cc: Benoit Cousson <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Sourav Poddar <[email protected]>
---
arch/arm/boot/dts/omap5-evm.dts | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts
index c2ea189..18e499c 100644
--- a/arch/arm/boot/dts/omap5-evm.dts
+++ b/arch/arm/boot/dts/omap5-evm.dts
@@ -39,3 +39,12 @@
reg = <0x48>;
};
};
+
+&i2c2 {
+ clock-frequency = <400000>;
+
+ bmp085@77 {
+ compatible = "bosch,bmp085";
+ reg = <0x77>;
+ };
+};
--
1.7.1

2012-08-13 10:04:21

by Sourav Poddar

[permalink] [raw]
Subject: [PATCHv2 1/4] arm/dts: omap5-evm: Add I2C support

Add I2C data node in omap5 device tree file.

Tested on omap5430 evm.

Cc: Benoit Cousson <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Sourav Poddar <[email protected]>
---
arch/arm/boot/dts/omap5.dtsi | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 57e5270..6b68dfe 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -145,6 +145,41 @@
#interrupt-cells = <1>;
};

+ i2c1: i2c@48070000 {
+ compatible = "ti,omap4-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ti,hwmods = "i2c1";
+ };
+
+ i2c2: i2c@48072000 {
+ compatible = "ti,omap4-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ti,hwmods = "i2c2";
+ };
+
+ i2c3: i2c@48060000 {
+ compatible = "ti,omap4-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ti,hwmods = "i2c3";
+ };
+
+ i2c4: i2c@4807A000 {
+ compatible = "ti,omap4-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ti,hwmods = "i2c4";
+ };
+
+ i2c5: i2c@4807C000 {
+ compatible = "ti,omap4-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ti,hwmods = "i2c5";
+ };
+
uart1: serial@4806a000 {
compatible = "ti,omap4-uart";
ti,hwmods = "uart1";
--
1.7.1

2012-08-13 10:05:06

by Sourav Poddar

[permalink] [raw]
Subject: [PATCH 3/4] arm/dts: omap5-evm: Add keypad data

Add keypad data node in omap5 device tree file.
Also fill the device tree binding parameters
with the required value in "omap5-evm" dts file.

Tested on omap5430 evm with 3.5 custom kernel.

Cc: Benoit Cousson <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Sourav Poddar <[email protected]>
---
v1->v2
Add key names as comments
arch/arm/boot/dts/omap5-evm.dts | 12 ++++++++++++
arch/arm/boot/dts/omap5.dtsi | 5 +++++
2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts
index 45a8aeb..c2ea189 100644
--- a/arch/arm/boot/dts/omap5-evm.dts
+++ b/arch/arm/boot/dts/omap5-evm.dts
@@ -17,6 +17,18 @@
device_type = "memory";
reg = <0x80000000 0x40000000>; /* 1 GB */
};
+
+ keypad {
+ keypad,num-rows = <8>;
+ keypad,num-columns = <8>;
+ linux,keymap = < 0x02020073 /* VOLUP */
+ 0x02030072 /* VOLDOWM */
+ 0x020400e7 /* SEND */
+ 0x02050066 /* HOME */
+ 0x0206006b /* END */
+ 0x020700d9 >; /* SEARCH */
+ linux,input-no-autorepeat;
+ };
};

&i2c4 {
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 6b68dfe..c38b823 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -216,4 +216,9 @@
clock-frequency = <48000000>;
};
};
+
+ keypad {
+ compatible = "ti,omap4-keypad";
+ ti,hwmods = "kbd";
+ };
};
--
1.7.1

2012-08-13 11:40:18

by Santosh Shilimkar

[permalink] [raw]
Subject: Re: [PATCHv2 0/4] Add device tree data for omap5

Sourav,

On Mon, Aug 13, 2012 at 3:35 PM, Sourav Poddar <[email protected]> wrote:
>
> The following patch series add i2c support for omap5.
> As well as enable I2C based devices like pressure and temperature
> through device tree. Also add onchip keypad dts data.
>
> Cc: Benoit Cousson <[email protected]>
> Cc: Felipe Balbi <[email protected]>
> Cc: Santosh Shilimkar <[email protected]>
>
> Sourav Poddar (4):
> arm/dts: omap5-evm: Add I2C support
> arm/dts: omap5-evm: Add tmp102 sensor support
> arm/dts: omap5-evm: Add keypad data
> arm/dts: omap5-evm: Add bmp085 sensor support
>
> arch/arm/boot/dts/omap5-evm.dts | 30 +++++++++++++++++++++++++++++
> arch/arm/boot/dts/omap5.dtsi | 40
> +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 70 insertions(+), 0 deletions(-)
>
The entire series looks fine to me.

Acked-by: Santosh Shilimkar <[email protected]>

2012-08-14 09:57:00

by Benoit Cousson

[permalink] [raw]
Subject: Re: [PATCHv2 2/4] arm/dts: omap5-evm: Add tmp102 sensor support

On 08/13/2012 12:05 PM, Sourav Poddar wrote:
> Add tmp102 temperature sensor data in omap5 evm dts file.
>
> Tested on omap5430 evm with 3.5 custom kernel.
>
> Cc: Benoit Cousson <[email protected]>
> Cc: Felipe Balbi <[email protected]>
> Cc: Santosh Shilimkar <[email protected]>
> Acked-by: Felipe Balbi <[email protected]>
> Signed-off-by: Sourav Poddar <[email protected]>
> ---
> arch/arm/boot/dts/omap5-evm.dts | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts
> index 200c39a..45a8aeb 100644
> --- a/arch/arm/boot/dts/omap5-evm.dts
> +++ b/arch/arm/boot/dts/omap5-evm.dts
> @@ -18,3 +18,12 @@
> reg = <0x80000000 0x40000000>; /* 1 GB */
> };
> };
> +
> +&i2c4 {
> + clock-frequency = <400000>;

Have you checked if we cannot run at faster speed? Reducing the speed
will impact every devices on the bus.
It might be needed, I just wanted to be sure.

You should maybe just add a small comment to explain what the device is
doing with potentially a link to the HW spec if available.

The same comments are applicable to the bmp085 patch.

Regards,
Benoit

2012-08-14 10:03:14

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCHv2 2/4] arm/dts: omap5-evm: Add tmp102 sensor support

On Tue, Aug 14, 2012 at 11:56:45AM +0200, Benoit Cousson wrote:
> On 08/13/2012 12:05 PM, Sourav Poddar wrote:
> > Add tmp102 temperature sensor data in omap5 evm dts file.
> >
> > Tested on omap5430 evm with 3.5 custom kernel.
> >
> > Cc: Benoit Cousson <[email protected]>
> > Cc: Felipe Balbi <[email protected]>
> > Cc: Santosh Shilimkar <[email protected]>
> > Acked-by: Felipe Balbi <[email protected]>
> > Signed-off-by: Sourav Poddar <[email protected]>
> > ---
> > arch/arm/boot/dts/omap5-evm.dts | 9 +++++++++
> > 1 files changed, 9 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts
> > index 200c39a..45a8aeb 100644
> > --- a/arch/arm/boot/dts/omap5-evm.dts
> > +++ b/arch/arm/boot/dts/omap5-evm.dts
> > @@ -18,3 +18,12 @@
> > reg = <0x80000000 0x40000000>; /* 1 GB */
> > };
> > };
> > +
> > +&i2c4 {
> > + clock-frequency = <400000>;
>
> Have you checked if we cannot run at faster speed? Reducing the speed
> will impact every devices on the bus.
> It might be needed, I just wanted to be sure.
>
> You should maybe just add a small comment to explain what the device is
> doing with potentially a link to the HW spec if available.
>
> The same comments are applicable to the bmp085 patch.

that sort of information should be placed on
Documentation/devicetree/bindings/*/$device.txt, right ? Why should we
replicate it on all dts files ? Besides, there are only two such entries
on all ARM DTS files. Do we really want to make dts files bigger with
links to documentation which can even be moved at any time to other
location by the manufacturer's choice ? Will anyone actually keep track
of such links to make sure they aren't broken ? And even if someone does
track those links, do we really want to keep sending such patches for
the dts files ?

--
balbi


Attachments:
(No filename) (1.81 kB)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-08-14 10:21:40

by Benoit Cousson

[permalink] [raw]
Subject: Re: [PATCHv2 2/4] arm/dts: omap5-evm: Add tmp102 sensor support

Hi Felipe,

On 08/14/2012 11:59 AM, Felipe Balbi wrote:
> On Tue, Aug 14, 2012 at 11:56:45AM +0200, Benoit Cousson wrote:
>> On 08/13/2012 12:05 PM, Sourav Poddar wrote:
>>> Add tmp102 temperature sensor data in omap5 evm dts file.
>>>
>>> Tested on omap5430 evm with 3.5 custom kernel.
>>>
>>> Cc: Benoit Cousson <[email protected]>
>>> Cc: Felipe Balbi <[email protected]>
>>> Cc: Santosh Shilimkar <[email protected]>
>>> Acked-by: Felipe Balbi <[email protected]>
>>> Signed-off-by: Sourav Poddar <[email protected]>
>>> ---
>>> arch/arm/boot/dts/omap5-evm.dts | 9 +++++++++
>>> 1 files changed, 9 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts
>>> index 200c39a..45a8aeb 100644
>>> --- a/arch/arm/boot/dts/omap5-evm.dts
>>> +++ b/arch/arm/boot/dts/omap5-evm.dts
>>> @@ -18,3 +18,12 @@
>>> reg = <0x80000000 0x40000000>; /* 1 GB */
>>> };
>>> };
>>> +
>>> +&i2c4 {
>>> + clock-frequency = <400000>;
>>
>> Have you checked if we cannot run at faster speed? Reducing the speed
>> will impact every devices on the bus.
>> It might be needed, I just wanted to be sure.
>>
>> You should maybe just add a small comment to explain what the device is
>> doing with potentially a link to the HW spec if available.
>>
>> The same comments are applicable to the bmp085 patch.
>
> that sort of information should be placed on
> Documentation/devicetree/bindings/*/$device.txt, right ? Why should we
> replicate it on all dts files ?

Well in that case, this is not part of the binding documentation, but
that can be a good idea to update the documentation indeed.

> Besides, there are only two such entries
> on all ARM DTS files. Do we really want to make dts files bigger with
> links to documentation which can even be moved at any time to other
> location by the manufacturer's choice ? Will anyone actually keep track
> of such links to make sure they aren't broken ? And even if someone does
> track those links, do we really want to keep sending such patches for
> the dts files ?

A little bit of comment and documentation will never hurt anybody and
will not have any impact on the DTB size. If that can save us some time
to avoid googling to know what device we are taking about, it is already
better than nothing.

Regards,
Benoit

2012-08-14 10:24:14

by Benoit Cousson

[permalink] [raw]
Subject: Re: [PATCHv2 0/4] Add device tree data for omap5

Hi Sourav,

On 08/13/2012 12:05 PM, Sourav Poddar wrote:
> The following patch series add i2c support for omap5.
> As well as enable I2C based devices like pressure and temperature
> through device tree. Also add onchip keypad dts data.

That series does not seems to apply on top of 3.6-rc1, what based did
you use?

Benoit


>
> Cc: Benoit Cousson <[email protected]>
> Cc: Felipe Balbi <[email protected]>
> Cc: Santosh Shilimkar <[email protected]>
>
> Sourav Poddar (4):
> arm/dts: omap5-evm: Add I2C support
> arm/dts: omap5-evm: Add tmp102 sensor support
> arm/dts: omap5-evm: Add keypad data
> arm/dts: omap5-evm: Add bmp085 sensor support
>
> arch/arm/boot/dts/omap5-evm.dts | 30 +++++++++++++++++++++++++++++
> arch/arm/boot/dts/omap5.dtsi | 40 +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 70 insertions(+), 0 deletions(-)
>

2012-08-14 10:27:53

by Sourav Poddar

[permalink] [raw]
Subject: Re: [PATCHv2 2/4] arm/dts: omap5-evm: Add tmp102 sensor support

Hi Benoit,

On Tue, Aug 14, 2012 at 3:26 PM, Benoit Cousson <[email protected]> wrote:
> On 08/13/2012 12:05 PM, Sourav Poddar wrote:
>> Add tmp102 temperature sensor data in omap5 evm dts file.
>>
>> Tested on omap5430 evm with 3.5 custom kernel.
>>
>> Cc: Benoit Cousson <[email protected]>
>> Cc: Felipe Balbi <[email protected]>
>> Cc: Santosh Shilimkar <[email protected]>
>> Acked-by: Felipe Balbi <[email protected]>
>> Signed-off-by: Sourav Poddar <[email protected]>
>> ---
>> arch/arm/boot/dts/omap5-evm.dts | 9 +++++++++
>> 1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts
>> index 200c39a..45a8aeb 100644
>> --- a/arch/arm/boot/dts/omap5-evm.dts
>> +++ b/arch/arm/boot/dts/omap5-evm.dts
>> @@ -18,3 +18,12 @@
>> reg = <0x80000000 0x40000000>; /* 1 GB */
>> };
>> };
>> +
>> +&i2c4 {
>> + clock-frequency = <400000>;
>
> Have you checked if we cannot run at faster speed? Reducing the speed
> will impact every devices on the bus.
> It might be needed, I just wanted to be sure.
>
Indeed, tmp 102(i2c4) and bmp085(i2c2) can run at speed upto 3.4 MHz.

Though, there are other devices on i2c2(tsl2771) and i2c4
(touchscreen) that will eventually come, support upto
400 KHz. May be I will change this to 3.4 MHz for now?And when
tsl2771 and touch device are added, I will
change it back to 400 kHz??

~Sourav
> You should maybe just add a small comment to explain what the device is
> doing with potentially a link to the HW spec if available.
>
> The same comments are applicable to the bmp085 patch.
>
> Regards,
> Benoit
>

2012-08-14 10:34:19

by Sourav Poddar

[permalink] [raw]
Subject: Re: [PATCHv2 0/4] Add device tree data for omap5

Hi Benoit,

On Tue, Aug 14, 2012 at 3:54 PM, Benoit Cousson <[email protected]> wrote:
> Hi Sourav,
>
> On 08/13/2012 12:05 PM, Sourav Poddar wrote:
>> The following patch series add i2c support for omap5.
>> As well as enable I2C based devices like pressure and temperature
>> through device tree. Also add onchip keypad dts data.
>
> That series does not seems to apply on top of 3.6-rc1, what based did
> you use?
>
My Bad. Send it on top of the testing branch (3.5-rc7).
Will rebase and send it on a 3.6-rc1.
> Benoit
>
>
>>
>> Cc: Benoit Cousson <[email protected]>
>> Cc: Felipe Balbi <[email protected]>
>> Cc: Santosh Shilimkar <[email protected]>
>>
>> Sourav Poddar (4):
>> arm/dts: omap5-evm: Add I2C support
>> arm/dts: omap5-evm: Add tmp102 sensor support
>> arm/dts: omap5-evm: Add keypad data
>> arm/dts: omap5-evm: Add bmp085 sensor support
>>
>> arch/arm/boot/dts/omap5-evm.dts | 30 +++++++++++++++++++++++++++++
>> arch/arm/boot/dts/omap5.dtsi | 40 +++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 70 insertions(+), 0 deletions(-)
>>
>