diff mbox

[v4,06/10] ARM: dts: am4372: Add DCAN nodes

Message ID 1415881371-4982-7-git-send-email-rogerq@ti.com
State New
Headers show

Commit Message

Roger Quadros Nov. 13, 2014, 12:22 p.m. UTC
The SoC contains 2 DCAN modules. Add them.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Marc Kleine-Budde Nov. 13, 2014, 2:07 p.m. UTC | #1
On 11/13/2014 01:22 PM, Roger Quadros wrote:
> The SoC contains 2 DCAN modules. Add them.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> ---
>  arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> index 899c57c..12fb1db 100644
> --- a/arch/arm/boot/dts/am4372.dtsi
> +++ b/arch/arm/boot/dts/am4372.dtsi
> @@ -901,6 +901,28 @@
>  			compatible = "mmio-sram";
>  			reg = <0x40300000 0x40000>; /* 256k */
>  		};
> +
> +		dcan0: can@481cc000 {
> +			compatible = "ti,am3352-d_can";

You should add "ti,am4372-d_can" as first compatible here.

> +			ti,hwmods = "d_can0";
> +			clocks = <&dcan0_fck>;
> +			clock-names = "fck";
> +			reg = <0x481cc000 0x2000>;
> +			syscon-raminit = <&am43xx_control_module 0x644 0>;
> +			interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
> +			status = "disabled";
> +		};
> +
> +		dcan1: can@481d0000 {
> +			compatible = "ti,am3352-d_can";

Same here.

> +			ti,hwmods = "d_can1";
> +			clocks = <&dcan1_fck>;
> +			clock-names = "fck";
> +			reg = <0x481d0000 0x2000>;
> +			syscon-raminit = <&am43xx_control_module 0x644 1>;
> +			interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
> +			status = "disabled";
> +		};
>  	};
>  };
>  
> 

Marc
Roger Quadros Nov. 13, 2014, 2:40 p.m. UTC | #2
On 11/13/2014 04:07 PM, Marc Kleine-Budde wrote:
> On 11/13/2014 01:22 PM, Roger Quadros wrote:
>> The SoC contains 2 DCAN modules. Add them.
>>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> ---
>>  arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
>>  1 file changed, 22 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
>> index 899c57c..12fb1db 100644
>> --- a/arch/arm/boot/dts/am4372.dtsi
>> +++ b/arch/arm/boot/dts/am4372.dtsi
>> @@ -901,6 +901,28 @@
>>  			compatible = "mmio-sram";
>>  			reg = <0x40300000 0x40000>; /* 256k */
>>  		};
>> +
>> +		dcan0: can@481cc000 {
>> +			compatible = "ti,am3352-d_can";
> 
> You should add "ti,am4372-d_can" as first compatible here.
> 
We don't have a separate compatible id for am4372-d_can
as it the IP exactly same as am3352-d_can.

cheers,
-roger

>> +			ti,hwmods = "d_can0";
>> +			clocks = <&dcan0_fck>;
>> +			clock-names = "fck";
>> +			reg = <0x481cc000 0x2000>;
>> +			syscon-raminit = <&am43xx_control_module 0x644 0>;
>> +			interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
>> +			status = "disabled";
>> +		};
>> +
>> +		dcan1: can@481d0000 {
>> +			compatible = "ti,am3352-d_can";
> 
> Same here.
> 
>> +			ti,hwmods = "d_can1";
>> +			clocks = <&dcan1_fck>;
>> +			clock-names = "fck";
>> +			reg = <0x481d0000 0x2000>;
>> +			syscon-raminit = <&am43xx_control_module 0x644 1>;
>> +			interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
>> +			status = "disabled";
>> +		};
>>  	};
>>  };
>>  
>>
> 
> Marc
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marc Kleine-Budde Nov. 13, 2014, 2:44 p.m. UTC | #3
On 11/13/2014 03:40 PM, Roger Quadros wrote:
> On 11/13/2014 04:07 PM, Marc Kleine-Budde wrote:
>> On 11/13/2014 01:22 PM, Roger Quadros wrote:
>>> The SoC contains 2 DCAN modules. Add them.
>>>
>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>> ---
>>>  arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
>>>  1 file changed, 22 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
>>> index 899c57c..12fb1db 100644
>>> --- a/arch/arm/boot/dts/am4372.dtsi
>>> +++ b/arch/arm/boot/dts/am4372.dtsi
>>> @@ -901,6 +901,28 @@
>>>  			compatible = "mmio-sram";
>>>  			reg = <0x40300000 0x40000>; /* 256k */
>>>  		};
>>> +
>>> +		dcan0: can@481cc000 {
>>> +			compatible = "ti,am3352-d_can";
>>
>> You should add "ti,am4372-d_can" as first compatible here.
>>
> We don't have a separate compatible id for am4372-d_can
> as it the IP exactly same as am3352-d_can.

Having the "ti,am4372-d_can" compatible gives you the freedom to add
some spacial handling for the IP if there turns that you need to without
needing to modify the device tree. (We do this on imx.)

Marc
Roger Quadros Nov. 13, 2014, 2:49 p.m. UTC | #4
On 11/13/2014 04:44 PM, Marc Kleine-Budde wrote:
> On 11/13/2014 03:40 PM, Roger Quadros wrote:
>> On 11/13/2014 04:07 PM, Marc Kleine-Budde wrote:
>>> On 11/13/2014 01:22 PM, Roger Quadros wrote:
>>>> The SoC contains 2 DCAN modules. Add them.
>>>>
>>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>>> ---
>>>>  arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
>>>>  1 file changed, 22 insertions(+)
>>>>
>>>> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
>>>> index 899c57c..12fb1db 100644
>>>> --- a/arch/arm/boot/dts/am4372.dtsi
>>>> +++ b/arch/arm/boot/dts/am4372.dtsi
>>>> @@ -901,6 +901,28 @@
>>>>  			compatible = "mmio-sram";
>>>>  			reg = <0x40300000 0x40000>; /* 256k */
>>>>  		};
>>>> +
>>>> +		dcan0: can@481cc000 {
>>>> +			compatible = "ti,am3352-d_can";
>>>
>>> You should add "ti,am4372-d_can" as first compatible here.
>>>
>> We don't have a separate compatible id for am4372-d_can
>> as it the IP exactly same as am3352-d_can.
> 
> Having the "ti,am4372-d_can" compatible gives you the freedom to add
> some spacial handling for the IP if there turns that you need to without
> needing to modify the device tree. (We do this on imx.)

Agreed. On OMAP platforms we don't add new compatible IDs unless we really need to.
Can we add "ti,am4372-d_can" even if it is not mentioned in Documentation/devicetree/bindings?

Tony what is your preference?

cheers,
-roger

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marc Kleine-Budde Nov. 13, 2014, 2:54 p.m. UTC | #5
On 11/13/2014 03:49 PM, Roger Quadros wrote:
> On 11/13/2014 04:44 PM, Marc Kleine-Budde wrote:
>> On 11/13/2014 03:40 PM, Roger Quadros wrote:
>>> On 11/13/2014 04:07 PM, Marc Kleine-Budde wrote:
>>>> On 11/13/2014 01:22 PM, Roger Quadros wrote:
>>>>> The SoC contains 2 DCAN modules. Add them.
>>>>>
>>>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>>>> ---
>>>>>  arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
>>>>>  1 file changed, 22 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
>>>>> index 899c57c..12fb1db 100644
>>>>> --- a/arch/arm/boot/dts/am4372.dtsi
>>>>> +++ b/arch/arm/boot/dts/am4372.dtsi
>>>>> @@ -901,6 +901,28 @@
>>>>>  			compatible = "mmio-sram";
>>>>>  			reg = <0x40300000 0x40000>; /* 256k */
>>>>>  		};
>>>>> +
>>>>> +		dcan0: can@481cc000 {
>>>>> +			compatible = "ti,am3352-d_can";
>>>>
>>>> You should add "ti,am4372-d_can" as first compatible here.
>>>>
>>> We don't have a separate compatible id for am4372-d_can
>>> as it the IP exactly same as am3352-d_can.
>>
>> Having the "ti,am4372-d_can" compatible gives you the freedom to add
>> some spacial handling for the IP if there turns that you need to without
>> needing to modify the device tree. (We do this on imx.)
> 
> Agreed. On OMAP platforms we don't add new compatible IDs unless we really need to.
> Can we add "ti,am4372-d_can" even if it is not mentioned in Documentation/devicetree/bindings?
> 
> Tony what is your preference?

I don't insist, do it the Omap way :)

Marc
Tony Lindgren Nov. 13, 2014, 5:40 p.m. UTC | #6
* Marc Kleine-Budde <mkl@pengutronix.de> [141113 06:55]:
> On 11/13/2014 03:49 PM, Roger Quadros wrote:
> > On 11/13/2014 04:44 PM, Marc Kleine-Budde wrote:
> >> On 11/13/2014 03:40 PM, Roger Quadros wrote:
> >>> On 11/13/2014 04:07 PM, Marc Kleine-Budde wrote:
> >>>> On 11/13/2014 01:22 PM, Roger Quadros wrote:
> >>>>> The SoC contains 2 DCAN modules. Add them.
> >>>>>
> >>>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
> >>>>> ---
> >>>>>  arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
> >>>>>  1 file changed, 22 insertions(+)
> >>>>>
> >>>>> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> >>>>> index 899c57c..12fb1db 100644
> >>>>> --- a/arch/arm/boot/dts/am4372.dtsi
> >>>>> +++ b/arch/arm/boot/dts/am4372.dtsi
> >>>>> @@ -901,6 +901,28 @@
> >>>>>  			compatible = "mmio-sram";
> >>>>>  			reg = <0x40300000 0x40000>; /* 256k */
> >>>>>  		};
> >>>>> +
> >>>>> +		dcan0: can@481cc000 {
> >>>>> +			compatible = "ti,am3352-d_can";
> >>>>
> >>>> You should add "ti,am4372-d_can" as first compatible here.
> >>>>
> >>> We don't have a separate compatible id for am4372-d_can
> >>> as it the IP exactly same as am3352-d_can.
> >>
> >> Having the "ti,am4372-d_can" compatible gives you the freedom to add
> >> some spacial handling for the IP if there turns that you need to without
> >> needing to modify the device tree. (We do this on imx.)
> > 
> > Agreed. On OMAP platforms we don't add new compatible IDs unless we really need to.
> > Can we add "ti,am4372-d_can" even if it is not mentioned in Documentation/devicetree/bindings?
> > 
> > Tony what is your preference?
> 
> I don't insist, do it the Omap way :)

I agree it's good to add if we need to add custom handling later on.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Roger Quadros Nov. 14, 2014, 4:22 p.m. UTC | #7
On 11/13/2014 07:40 PM, Tony Lindgren wrote:
> * Marc Kleine-Budde <mkl@pengutronix.de> [141113 06:55]:
>> On 11/13/2014 03:49 PM, Roger Quadros wrote:
>>> On 11/13/2014 04:44 PM, Marc Kleine-Budde wrote:
>>>> On 11/13/2014 03:40 PM, Roger Quadros wrote:
>>>>> On 11/13/2014 04:07 PM, Marc Kleine-Budde wrote:
>>>>>> On 11/13/2014 01:22 PM, Roger Quadros wrote:
>>>>>>> The SoC contains 2 DCAN modules. Add them.
>>>>>>>
>>>>>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>>>>>> ---
>>>>>>>  arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
>>>>>>>  1 file changed, 22 insertions(+)
>>>>>>>
>>>>>>> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
>>>>>>> index 899c57c..12fb1db 100644
>>>>>>> --- a/arch/arm/boot/dts/am4372.dtsi
>>>>>>> +++ b/arch/arm/boot/dts/am4372.dtsi
>>>>>>> @@ -901,6 +901,28 @@
>>>>>>>  			compatible = "mmio-sram";
>>>>>>>  			reg = <0x40300000 0x40000>; /* 256k */
>>>>>>>  		};
>>>>>>> +
>>>>>>> +		dcan0: can@481cc000 {
>>>>>>> +			compatible = "ti,am3352-d_can";
>>>>>>
>>>>>> You should add "ti,am4372-d_can" as first compatible here.
>>>>>>
>>>>> We don't have a separate compatible id for am4372-d_can
>>>>> as it the IP exactly same as am3352-d_can.
>>>>
>>>> Having the "ti,am4372-d_can" compatible gives you the freedom to add
>>>> some spacial handling for the IP if there turns that you need to without
>>>> needing to modify the device tree. (We do this on imx.)
>>>
>>> Agreed. On OMAP platforms we don't add new compatible IDs unless we really need to.
>>> Can we add "ti,am4372-d_can" even if it is not mentioned in Documentation/devicetree/bindings?
>>>
>>> Tony what is your preference?
>>
>> I don't insist, do it the Omap way :)
> 
> I agree it's good to add if we need to add custom handling later on.

As of now I don't foresee any custom handling for am4372-d_can vs am3352-d_can, but I can
add am4372-d_can anyways. In that case, do I need to mention it in 
Documentation/devicetree/bindings/net/can/c_can.txt?

I guess not, cause we don't do anything specific to am4372-d_can there.

cheers,
-roger

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren Nov. 14, 2014, 6:07 p.m. UTC | #8
* Roger Quadros <rogerq@ti.com> [141114 08:24]:
> On 11/13/2014 07:40 PM, Tony Lindgren wrote:
> > * Marc Kleine-Budde <mkl@pengutronix.de> [141113 06:55]:
> >> On 11/13/2014 03:49 PM, Roger Quadros wrote:
> >>> On 11/13/2014 04:44 PM, Marc Kleine-Budde wrote:
> >>>> On 11/13/2014 03:40 PM, Roger Quadros wrote:
> >>>>> On 11/13/2014 04:07 PM, Marc Kleine-Budde wrote:
> >>>>>> On 11/13/2014 01:22 PM, Roger Quadros wrote:
> >>>>>>> The SoC contains 2 DCAN modules. Add them.
> >>>>>>>
> >>>>>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
> >>>>>>> ---
> >>>>>>>  arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
> >>>>>>>  1 file changed, 22 insertions(+)
> >>>>>>>
> >>>>>>> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> >>>>>>> index 899c57c..12fb1db 100644
> >>>>>>> --- a/arch/arm/boot/dts/am4372.dtsi
> >>>>>>> +++ b/arch/arm/boot/dts/am4372.dtsi
> >>>>>>> @@ -901,6 +901,28 @@
> >>>>>>>  			compatible = "mmio-sram";
> >>>>>>>  			reg = <0x40300000 0x40000>; /* 256k */
> >>>>>>>  		};
> >>>>>>> +
> >>>>>>> +		dcan0: can@481cc000 {
> >>>>>>> +			compatible = "ti,am3352-d_can";
> >>>>>>
> >>>>>> You should add "ti,am4372-d_can" as first compatible here.
> >>>>>>
> >>>>> We don't have a separate compatible id for am4372-d_can
> >>>>> as it the IP exactly same as am3352-d_can.
> >>>>
> >>>> Having the "ti,am4372-d_can" compatible gives you the freedom to add
> >>>> some spacial handling for the IP if there turns that you need to without
> >>>> needing to modify the device tree. (We do this on imx.)
> >>>
> >>> Agreed. On OMAP platforms we don't add new compatible IDs unless we really need to.
> >>> Can we add "ti,am4372-d_can" even if it is not mentioned in Documentation/devicetree/bindings?
> >>>
> >>> Tony what is your preference?
> >>
> >> I don't insist, do it the Omap way :)
> > 
> > I agree it's good to add if we need to add custom handling later on.
> 
> As of now I don't foresee any custom handling for am4372-d_can vs am3352-d_can, but I can
> add am4372-d_can anyways. In that case, do I need to mention it in 
> Documentation/devicetree/bindings/net/can/c_can.txt?
>
> I guess not, cause we don't do anything specific to am4372-d_can there.

I think you should to avoid checkpatch.pl warnings.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 899c57c..12fb1db 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -901,6 +901,28 @@ 
 			compatible = "mmio-sram";
 			reg = <0x40300000 0x40000>; /* 256k */
 		};
+
+		dcan0: can@481cc000 {
+			compatible = "ti,am3352-d_can";
+			ti,hwmods = "d_can0";
+			clocks = <&dcan0_fck>;
+			clock-names = "fck";
+			reg = <0x481cc000 0x2000>;
+			syscon-raminit = <&am43xx_control_module 0x644 0>;
+			interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		dcan1: can@481d0000 {
+			compatible = "ti,am3352-d_can";
+			ti,hwmods = "d_can1";
+			clocks = <&dcan1_fck>;
+			clock-names = "fck";
+			reg = <0x481d0000 0x2000>;
+			syscon-raminit = <&am43xx_control_module 0x644 1>;
+			interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
 	};
 };