diff mbox

[v2,1/2] arm/dts: AM33XX: Add D_CAN device tree data

Message ID 1343219012-19472-2-git-send-email-anilkumar@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

AnilKumar, Chimata July 25, 2012, 12:23 p.m. UTC
Add Bosch D_CAN controller device tree data to AM33XX dtsi file
by adding d_can device node with all the necessary parameters.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Sergei Shtylyov July 25, 2012, 12:43 p.m. UTC | #1
Hello.

On 25-07-2012 16:23, AnilKumar Ch wrote:

> Add Bosch D_CAN controller device tree data to AM33XX dtsi file
> by adding d_can device node with all the necessary parameters.

> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> ---
>   arch/arm/boot/dts/am33xx.dtsi |    5 +++++
>   1 file changed, 5 insertions(+)

> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> index 9b974dc..2db2ffb 100644
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -163,5 +163,10 @@
>   			#size-cells = <0>;
>   			ti,hwmods = "i2c3";
>   		};
> +
> +		dcan1: d_can@481D0000 {

    Address postfix in the node name and no "reg" property?

> +			compatible = "bosch,d_can";
> +			ti,hwmods = "d_can1";
> +		};

WBR, Sergei
Daniel Mack July 26, 2012, 8:36 a.m. UTC | #2
On 25.07.2012 14:43, Sergei Shtylyov wrote:
> Hello.
> 
> On 25-07-2012 16:23, AnilKumar Ch wrote:
> 
>> Add Bosch D_CAN controller device tree data to AM33XX dtsi file
>> by adding d_can device node with all the necessary parameters.
> 
>> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
>> ---
>>   arch/arm/boot/dts/am33xx.dtsi |    5 +++++
>>   1 file changed, 5 insertions(+)
> 
>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>> index 9b974dc..2db2ffb 100644
>> --- a/arch/arm/boot/dts/am33xx.dtsi
>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>> @@ -163,5 +163,10 @@
>>   			#size-cells = <0>;
>>   			ti,hwmods = "i2c3";
>>   		};
>> +
>> +		dcan1: d_can@481D0000 {
> 
>     Address postfix in the node name and no "reg" property?

This still works due to the hwmod mappings OMAP relies on. I would still
put it there, so the switch to real DT definitions will be less painful.


Daniel
Koen Kooi July 26, 2012, 8:46 a.m. UTC | #3
Op 25 jul. 2012, om 14:23 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:

> Add Bosch D_CAN controller device tree data to AM33XX dtsi file
> by adding d_can device node with all the necessary parameters.
> 
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> ---
> arch/arm/boot/dts/am33xx.dtsi |    5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> index 9b974dc..2db2ffb 100644
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -163,5 +163,10 @@
> 			#size-cells = <0>;
> 			ti,hwmods = "i2c3";
> 		};
> +
> +		dcan1: d_can@481D0000 {
> +			compatible = "bosch,d_can";
> +			ti,hwmods = "d_can1";
> +		};
> 	};

I scanned the linux-networking mailinglist and l-o-ml, but I can't find the patchset that actually adds the d_can drivers, could you provide a link to that? I have 2 different CAN capes I'd like to test on beaglebone.

regards,

Koen
AnilKumar, Chimata July 26, 2012, 9:03 a.m. UTC | #4
On Thu, Jul 26, 2012 at 14:16:33, Koen Kooi wrote:
> 
> Op 25 jul. 2012, om 14:23 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
> 
> > Add Bosch D_CAN controller device tree data to AM33XX dtsi file
> > by adding d_can device node with all the necessary parameters.
> > 
> > Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> > ---
> > arch/arm/boot/dts/am33xx.dtsi |    5 +++++
> > 1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> > index 9b974dc..2db2ffb 100644
> > --- a/arch/arm/boot/dts/am33xx.dtsi
> > +++ b/arch/arm/boot/dts/am33xx.dtsi
> > @@ -163,5 +163,10 @@
> > 			#size-cells = <0>;
> > 			ti,hwmods = "i2c3";
> > 		};
> > +
> > +		dcan1: d_can@481D0000 {
> > +			compatible = "bosch,d_can";
> > +			ti,hwmods = "d_can1";
> > +		};
> > 	};
> 
> I scanned the linux-networking mailinglist and l-o-ml, but I can't find the patchset that actually adds the d_can drivers, could you provide a link to that? I have 2 different CAN capes I'd like to test on beaglebone.
> 

You can find it from linux-next or net-next trees, D_CAN support is added
to C_CAN driver.

http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git;
a=commitdiff;h=69927fccd96b15bd228bb82d356a7a2a0cfaeefb

Regards
AnilKumar
Marc Kleine-Budde July 26, 2012, 9:14 a.m. UTC | #5
On 07/26/2012 11:03 AM, AnilKumar, Chimata wrote:
> On Thu, Jul 26, 2012 at 14:16:33, Koen Kooi wrote:
>>
>> Op 25 jul. 2012, om 14:23 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
>>
>>> Add Bosch D_CAN controller device tree data to AM33XX dtsi file
>>> by adding d_can device node with all the necessary parameters.
>>>
>>> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
>>> ---
>>> arch/arm/boot/dts/am33xx.dtsi |    5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>>> index 9b974dc..2db2ffb 100644
>>> --- a/arch/arm/boot/dts/am33xx.dtsi
>>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>>> @@ -163,5 +163,10 @@
>>> 			#size-cells = <0>;
>>> 			ti,hwmods = "i2c3";
>>> 		};
>>> +
>>> +		dcan1: d_can@481D0000 {
>>> +			compatible = "bosch,d_can";
>>> +			ti,hwmods = "d_can1";
>>> +		};
>>> 	};
>>
>> I scanned the linux-networking mailinglist and l-o-ml, but I can't find the patchset that actually adds the d_can drivers, could you provide a link to that? I have 2 different CAN capes I'd like to test on beaglebone.
>>
> 
> You can find it from linux-next or net-next trees, D_CAN support is added
> to C_CAN driver.
> 
> http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git;
> a=commitdiff;h=69927fccd96b15bd228bb82d356a7a2a0cfaeefb

Meanwhile it's in Linus's git tree.

Marc
Koen Kooi July 26, 2012, 9:35 a.m. UTC | #6
Op 26 jul. 2012, om 11:03 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:

> On Thu, Jul 26, 2012 at 14:16:33, Koen Kooi wrote:
>> 
>> Op 25 jul. 2012, om 14:23 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
>> 
>>> Add Bosch D_CAN controller device tree data to AM33XX dtsi file
>>> by adding d_can device node with all the necessary parameters.
>>> 
>>> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
>>> ---
>>> arch/arm/boot/dts/am33xx.dtsi |    5 +++++
>>> 1 file changed, 5 insertions(+)
>>> 
>>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>>> index 9b974dc..2db2ffb 100644
>>> --- a/arch/arm/boot/dts/am33xx.dtsi
>>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>>> @@ -163,5 +163,10 @@
>>> 			#size-cells = <0>;
>>> 			ti,hwmods = "i2c3";
>>> 		};
>>> +
>>> +		dcan1: d_can@481D0000 {
>>> +			compatible = "bosch,d_can";
>>> +			ti,hwmods = "d_can1";
>>> +		};
>>> 	};
>> 
>> I scanned the linux-networking mailinglist and l-o-ml, but I can't find the patchset that actually adds the d_can drivers, could you provide a link to that? I have 2 different CAN capes I'd like to test on beaglebone.
>> 
> 
> You can find it from linux-next or net-next trees, D_CAN support is added
> to C_CAN driver.
> 
> http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git;
> a=commitdiff;h=69927fccd96b15bd228bb82d356a7a2a0cfaeefb

Thanks! I'll try merging net-next into l-o master and see if I can get the CAN boards to work.

regards,

Koen
Sergei Shtylyov July 26, 2012, 1:04 p.m. UTC | #7
Hello.

On 26-07-2012 12:36, Daniel Mack wrote:

>>> Add Bosch D_CAN controller device tree data to AM33XX dtsi file
>>> by adding d_can device node with all the necessary parameters.

>>> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
>>> ---
>>>    arch/arm/boot/dts/am33xx.dtsi |    5 +++++
>>>    1 file changed, 5 insertions(+)

>>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>>> index 9b974dc..2db2ffb 100644
>>> --- a/arch/arm/boot/dts/am33xx.dtsi
>>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>>> @@ -163,5 +163,10 @@
>>>    			#size-cells = <0>;
>>>    			ti,hwmods = "i2c3";
>>>    		};
>>> +
>>> +		dcan1: d_can@481D0000 {
>>
>>      Address postfix in the node name and no "reg" property?

> This still works due to the hwmod mappings OMAP relies on.

    I.e. the "reg" property is populated in runtime?

> I would still
> put it there, so the switch to real DT definitions will be less painful.

    How it helps anything?

> Daniel

WBR, Sergei
Vaibhav Hiremath Aug. 3, 2012, 6:28 a.m. UTC | #8
On 7/25/2012 5:53 PM, AnilKumar Ch wrote:
> Add Bosch D_CAN controller device tree data to AM33XX dtsi file
> by adding d_can device node with all the necessary parameters.
> 
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> ---
>  arch/arm/boot/dts/am33xx.dtsi |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> index 9b974dc..2db2ffb 100644
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -163,5 +163,10 @@
>  			#size-cells = <0>;
>  			ti,hwmods = "i2c3";
>  		};
> +
> +		dcan1: d_can@481D0000 {
> +			compatible = "bosch,d_can";
> +			ti,hwmods = "d_can1";
> +		};

Anil,

Any reason why we are only specifying dcan1 instance? Shouldn't we
specify dcan0 as well here?

Thanks,
Vaibhav


>  	};
>  };
>
Vaibhav Hiremath Aug. 3, 2012, 9:14 a.m. UTC | #9
On 7/26/2012 6:34 PM, Sergei Shtylyov wrote:
> Hello.
> 
> On 26-07-2012 12:36, Daniel Mack wrote:
> 
>>>> Add Bosch D_CAN controller device tree data to AM33XX dtsi file
>>>> by adding d_can device node with all the necessary parameters.
> 
>>>> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
>>>> ---
>>>>    arch/arm/boot/dts/am33xx.dtsi |    5 +++++
>>>>    1 file changed, 5 insertions(+)
> 
>>>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>>>> index 9b974dc..2db2ffb 100644
>>>> --- a/arch/arm/boot/dts/am33xx.dtsi
>>>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>>>> @@ -163,5 +163,10 @@
>>>>    			#size-cells = <0>;
>>>>    			ti,hwmods = "i2c3";
>>>>    		};
>>>> +
>>>> +		dcan1: d_can@481D0000 {
>>>
>>>      Address postfix in the node name and no "reg" property?
> 
>> This still works due to the hwmod mappings OMAP relies on.
> 
>     I.e. the "reg" property is populated in runtime?
> 
>> I would still
>> put it there, so the switch to real DT definitions will be less painful.
> 
>     How it helps anything?
> 

This is required field if you want to use "of_dev_auxdata", without
"reg" property OF layer fails to create dev_id (name) bindings with what
you have specified as part of "of_dev_auxdata".

And with respect to CAN driver, even though we are using hwmod, I would
want to create dev_id = d_can.0 and d_can.1. And this is only possible
if Address and compatible string matches.

So this field is important and required in this case.

Thanks,
Vaibhav
AnilKumar, Chimata Aug. 7, 2012, 11:40 a.m. UTC | #10
Vaibhav,

Thanks for the review.

On Fri, Aug 03, 2012 at 11:58:41, Hiremath, Vaibhav wrote:
> 
> 
> On 7/25/2012 5:53 PM, AnilKumar Ch wrote:
> > Add Bosch D_CAN controller device tree data to AM33XX dtsi file
> > by adding d_can device node with all the necessary parameters.
> > 
> > Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> > ---
> >  arch/arm/boot/dts/am33xx.dtsi |    5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> > index 9b974dc..2db2ffb 100644
> > --- a/arch/arm/boot/dts/am33xx.dtsi
> > +++ b/arch/arm/boot/dts/am33xx.dtsi
> > @@ -163,5 +163,10 @@
> >  			#size-cells = <0>;
> >  			ti,hwmods = "i2c3";
> >  		};
> > +
> > +		dcan1: d_can@481D0000 {
> > +			compatible = "bosch,d_can";
> > +			ti,hwmods = "d_can1";
> > +		};
> 
> Anil,
> 
> Any reason why we are only specifying dcan1 instance? Shouldn't we
> specify dcan0 as well here?
> 

Yes, I agree dcan0 needs to add because SoC support two instances. I
have added d_can1 only because on AM335x-EVM d_can1 is available and
in other case AM335x-bone have two instances available. I will send next
version of these patches.

Regards
AnilKumar
diff mbox

Patch

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 9b974dc..2db2ffb 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -163,5 +163,10 @@ 
 			#size-cells = <0>;
 			ti,hwmods = "i2c3";
 		};
+
+		dcan1: d_can@481D0000 {
+			compatible = "bosch,d_can";
+			ti,hwmods = "d_can1";
+		};
 	};
 };