Add device tree data for omap5
cover 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.
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(-)
PATCH 1/4 arm/dts: omap5-evm: Add I2C support
Add I2C data node in omap5 device tree file.
Tested on omap5430 sdp.
--- arch/arm/boot/dts/omap5.dtsi | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)
arch/arm/boot/dts/omap5.dtsi +35 -0
@@ -145,6 +145,41 @@ #interrupt-cells = <1>; }; + i2c1: i2c at 48070000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c1"; + }; + + i2c2: i2c at 48072000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c2"; + }; + + i2c3: i2c at 48060000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c3"; + }; + + i2c4: i2c at 4807A000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c4"; + }; + + i2c5: i2c at 4807C000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c5"; + }; + uart1: serial at 4806a000 { compatible = "ti,omap4-uart"; ti,hwmods = "uart1";
Signature · 1 line
1.7.1
Re: [PATCH 1/4] arm/dts: omap5-evm: Add I2C support
Hello.
Quoted 18 lines · Sourav Poddar
Add I2C data node in omap5 device tree file.
Tested on omap5430 sdp.
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(-)arch/arm/boot/dts/omap5.dtsi +0
-0
arch/arm/boot/dts/omap5.dtsi line 152
Quoted 8 lines
arch/arm/boot/dts/omap5.dtsi +5
-0@@ -145,6 +145,41 @@ #interrupt-cells = <1>; }; + i2c1: i2c at 48070000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c1";
Address postfix in the node name and no "reg" property?
WBR, Sergei
Re: [PATCH 1/4] arm/dts: omap5-evm: Add I2C support
Hi,
Quoted 25 lines · Sergei Shtylyov
Hello.
Quoted 21 lines · Sourav Poddar
Add I2C data node in omap5 device tree file.
Tested on omap5430 sdp.
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(-)arch/arm/boot/dts/omap5.dtsi +0
-0@@ -145,6 +145,41 @@ #interrupt-cells = <1>; };
Quoted 7 lines
arch/arm/boot/dts/omap5.dtsi line 152
Quoted 5 lines
arch/arm/boot/dts/omap5.dtsi +5
-0+ i2c1: i2c at 48070000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c1";Address postfix in the node name and no "reg" property?
that's because of the ti,hwmods attribute. OMAP is still not entirely converted to DT and there's this weird ti,hwmods attribute. OMAP's hwmod framework will fill up register addresses, irqs, etc when the device is created. Oh well...
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120806/56e58e13/attachment.sig>
PATCH 2/4 arm/dts: omap5-evm: Add tmp102 sensor support
In reply to Sourav PoddarAdd tmp102 temperature sensor data in omap5 evm dts file.
Tested on omap5430 sdp with 3.5 custom kernel.
--- arch/arm/boot/dts/omap5-evm.dts | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/boot/dts/omap5-evm.dts +9 -0
@@ -18,3 +18,12 @@ reg = <0x80000000 0x40000000>; /* 1 GB */ }; }; + +&i2c4 { + clock-frequency = <400000>; + + tmp102 at 48{ + compatible = "ti,tmp102"; + reg = <0x48>; + }; +};
Signature · 1 line
1.7.1
PATCH 3/4 arm/dts: omap5-evm: Add keypad data
In reply to Sourav PoddarAdd 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.
--- arch/arm/boot/dts/omap5-evm.dts | 12 ++++++++++++ arch/arm/boot/dts/omap5.dtsi | 5 +++++ 2 files changed, 17 insertions(+), 0 deletions(-)
arch/arm/boot/dts/omap5-evm.dts +12 -0
@@ -17,6 +17,18 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + keypad { + keypad,num-rows = <8>; + keypad,num-columns = <8>; + linux,keymap = < 0x02020073 + 0x02030072 + 0x020400e7 + 0x02050066 + 0x0206006b + 0x020700d9 >; + linux,input-no-autorepeat; + }; }; &i2c4 {
arch/arm/boot/dts/omap5.dtsi +5 -0
@@ -216,4 +216,9 @@ clock-frequency = <48000000>; }; }; + + keypad { + compatible = "ti,omap4-keypad"; + ti,hwmods = "kbd"; + }; };
Signature · 1 line
1.7.1
Re: [PATCH 3/4] arm/dts: omap5-evm: Add keypad data
Op 3 aug. 2012, om 14:38 heeft Sourav Poddar <[email protected]> het volgende geschreven:
Quoted 26 lines
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]>---
arch/arm/boot/dts/omap5-evm.dts| 12 ++++++++++++arch/arm/boot/dts/omap5.dtsi| 5 +++++2 files changed, 17 insertions(+), 0 deletions(-)arch/arm/boot/dts/omap5-evm.dts +2
-0@@ -17,6 +17,18 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + keypad {
arch/arm/boot/dts/omap5-evm.dts line 31
Quoted 10 lines
arch/arm/boot/dts/omap5-evm.dts +10
-0+ keypad,num-rows = <8>; + keypad,num-columns = <8>; + linux,keymap = < 0x02020073 + 0x02030072 + 0x020400e7 + 0x02050066 + 0x0206006b + 0x020700d9 >; + linux,input-no-autorepeat; + };
This not a criticism on your patch, but a generic question about DT: Is there no way to have nice constants for keys like we have in the kernel, like KEY_POWER, KEY_UP, etc? If no, does DT allow comments so I can look at a dts and see which keycodes are mapped instead of having to dig up the sources?
regards,
Koen
Re: [PATCH 3/4] arm/dts: omap5-evm: Add keypad data
Hi,
Quoted 33 lines · Koen Kooi
Op 3 aug. 2012, om 14:38 heeft Sourav Poddar <[email protected]> het volgende geschreven:
Quoted 30 lines
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]>---
arch/arm/boot/dts/omap5-evm.dts| 12 ++++++++++++arch/arm/boot/dts/omap5.dtsi| 5 +++++2 files changed, 17 insertions(+), 0 deletions(-)arch/arm/boot/dts/omap5-evm.dts +6
-0@@ -17,6 +17,18 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + keypad { + keypad,num-rows = <8>; + keypad,num-columns = <8>; + linux,keymap = < 0x02020073 + 0x02030072
Quoted 8 lines
arch/arm/boot/dts/omap5-evm.dts line 31
Quoted 6 lines
arch/arm/boot/dts/omap5-evm.dts +6
-0+ 0x020400e7 + 0x02050066 + 0x0206006b + 0x020700d9 >; + linux,input-no-autorepeat; + };This not a criticism on your patch, but a generic question about DT: Is there no way to have nice constants for keys like we have in the kernel, like
KEY_POWER,KEY_UP, etc?
There is way, something like this ..
key_C {
keypad,row = <2>;
keypad,column = <1>;
linux,code = <46>;
};But its not the preferred approach mainly because of the fact that it is too big. So suppose, if we have 100 key codes, we will have 400 -500 lines of code in our dts file for the mapping only.
If no, does DT allow comments so I can look at a dts and see which
keycodes are mapped instead of having to dig up the sources? Yes, comments are allowed and seems to be better option to do.
~Sourav
Quoted 4 lines
regards,
Koen
Re: [PATCH 3/4] arm/dts: omap5-evm: Add keypad data
In reply to Sourav PoddarOp 3 aug. 2012, om 14:38 heeft Sourav Poddar <[email protected]> het volgende geschreven:
Quoted 26 lines
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]>---
arch/arm/boot/dts/omap5-evm.dts| 12 ++++++++++++arch/arm/boot/dts/omap5.dtsi| 5 +++++2 files changed, 17 insertions(+), 0 deletions(-)arch/arm/boot/dts/omap5-evm.dts +2
-0@@ -17,6 +17,18 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + keypad {
arch/arm/boot/dts/omap5-evm.dts line 31
Quoted 10 lines
arch/arm/boot/dts/omap5-evm.dts +10
-0+ keypad,num-rows = <8>; + keypad,num-columns = <8>; + linux,keymap = < 0x02020073 + 0x02030072 + 0x020400e7 + 0x02050066 + 0x0206006b + 0x020700d9 >; + linux,input-no-autorepeat; + };
Again not a coment on your patch, but on DT:
If DT bindings must be OS independent, what then, is that linux keycode doing there?
regards,
Koen
Re: [PATCH 3/4] arm/dts: omap5-evm: Add keypad data
Hi Koen,
Quoted 42 lines · Koen Kooi
Op 3 aug. 2012, om 14:38 heeft Sourav Poddar <[email protected]> het volgende geschreven:
Quoted 26 lines
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]>---
arch/arm/boot/dts/omap5-evm.dts| 12 ++++++++++++arch/arm/boot/dts/omap5.dtsi| 5 +++++2 files changed, 17 insertions(+), 0 deletions(-)arch/arm/boot/dts/omap5-evm.dts +2
-0@@ -17,6 +17,18 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + keypad {arch/arm/boot/dts/omap5-evm.dts line 31
Quoted 10 lines
arch/arm/boot/dts/omap5-evm.dts +10
-0+ keypad,num-rows = <8>; + keypad,num-columns = <8>; + linux,keymap = < 0x02020073 + 0x02030072 + 0x020400e7 + 0x02050066 + 0x0206006b + 0x020700d9 >; + linux,input-no-autorepeat; + };Again not a coment on your patch, but on DT:
Quoted 2 lines
If DT bindings must be OS independent, what then, is that linux keycode doing there?
Currently, for all matrix connected keyboards the keymap are defined in the scope of the
linux key code since that is a stable and standardized interface at this time.
For the above reason , computation of the keymap uses linux keycode
row << 24 | column << 16 | linux-key-code
I think this is the primary reason for keeping "linux" prefix with this property.
Quoted 4 lines
regards,
Koen
PATCH 4/4 arm/dts: omap5-evm: Add bmp085 sensor support
In reply to Sourav PoddarAdd bmp085 pressure sensor data in omap5 evm dts file.
Tested on omap5430 sdp with 3.5 custom kernel.
--- arch/arm/boot/dts/omap5-evm.dts | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/boot/dts/omap5-evm.dts +9 -0
@@ -39,3 +39,12 @@ reg = <0x48>; }; }; + +&i2c2 { + clock-frequency = <400000>; + + bmp085 at 77 { + compatible = "bosch,bmp085"; + reg = <0x77>; + }; +};
Signature · 1 line
1.7.1