diff mbox series

[1/2] arm64: dts: renesas: r8a77965: Add CAN controller nodes

Message ID 20181118173327.4704-1-marek.vasut+renesas@gmail.com (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show
Series [1/2] arm64: dts: renesas: r8a77965: Add CAN controller nodes | expand

Commit Message

Marek Vasut Nov. 18, 2018, 5:33 p.m. UTC
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

This patch adds CAN{0,1} controller nodes for the R8A77965 SoC.

Based on several similar patches of the R8A7795 device tree
by Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
and Geert Uytterhoeven <geert+renesas@glider.be>.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Rob Herring <robh@kernel.org>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
---
 arch/arm64/boot/dts/renesas/r8a77965.dtsi | 26 +++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

Comments

Wolfram Sang Nov. 18, 2018, 11:02 p.m. UTC | #1
On Sun, Nov 18, 2018 at 06:33:26PM +0100, Marek Vasut wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> 
> This patch adds CAN{0,1} controller nodes for the R8A77965 SoC.
> 
> Based on several similar patches of the R8A7795 device tree
> by Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> and Geert Uytterhoeven <geert+renesas@glider.be>.
> 
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Simon Horman <horms+renesas@verge.net.au>
> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org

Were you able to do some testing using EXIO connectors? Would be nice to
know what was tested.
Marek Vasut Nov. 18, 2018, 11:46 p.m. UTC | #2
On 11/19/2018 12:02 AM, Wolfram Sang wrote:
> On Sun, Nov 18, 2018 at 06:33:26PM +0100, Marek Vasut wrote:
>> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>>
>> This patch adds CAN{0,1} controller nodes for the R8A77965 SoC.
>>
>> Based on several similar patches of the R8A7795 device tree
>> by Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>> and Geert Uytterhoeven <geert+renesas@glider.be>.
>>
>> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
>> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: Simon Horman <horms+renesas@verge.net.au>
>> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
>> Cc: linux-renesas-soc@vger.kernel.org
>> Cc: linux-arm-kernel@lists.infradead.org
> 
> Were you able to do some testing using EXIO connectors? Would be nice to
> know what was tested.

Not on the M3N, since I don't see it broken out on the EXIO ; is it
really there ? It'd be easy to test on M3NSK with KF, but I don't have
either KF or M3NSK.
Geert Uytterhoeven Nov. 19, 2018, 9 a.m. UTC | #3
Hi Marek,

On Mon, Nov 19, 2018 at 12:46 AM Marek Vasut <marek.vasut@gmail.com> wrote:
> On 11/19/2018 12:02 AM, Wolfram Sang wrote:
> > On Sun, Nov 18, 2018 at 06:33:26PM +0100, Marek Vasut wrote:
> >> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >>
> >> This patch adds CAN{0,1} controller nodes for the R8A77965 SoC.
> >>
> >> Based on several similar patches of the R8A7795 device tree
> >> by Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> >> and Geert Uytterhoeven <geert+renesas@glider.be>.
> >>
> >> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> >> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> >> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> >> Cc: Rob Herring <robh@kernel.org>
> >> Cc: Simon Horman <horms+renesas@verge.net.au>
> >> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> >> Cc: linux-renesas-soc@vger.kernel.org
> >> Cc: linux-arm-kernel@lists.infradead.org
> >
> > Were you able to do some testing using EXIO connectors? Would be nice to
> > know what was tested.
>
> Not on the M3N, since I don't see it broken out on the EXIO ; is it
> really there ? It'd be easy to test on M3NSK with KF, but I don't have
> either KF or M3NSK.

Please have a look at EXIO Connector D, pins 13/14/15.

Gr{oetje,eeting}s,

                        Geert
Marek Vasut Nov. 20, 2018, 11:30 p.m. UTC | #4
On 11/19/2018 10:00 AM, Geert Uytterhoeven wrote:
> Hi Marek,

Hi,

> On Mon, Nov 19, 2018 at 12:46 AM Marek Vasut <marek.vasut@gmail.com> wrote:
>> On 11/19/2018 12:02 AM, Wolfram Sang wrote:
>>> On Sun, Nov 18, 2018 at 06:33:26PM +0100, Marek Vasut wrote:
>>>> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>>>>
>>>> This patch adds CAN{0,1} controller nodes for the R8A77965 SoC.
>>>>
>>>> Based on several similar patches of the R8A7795 device tree
>>>> by Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>>>> and Geert Uytterhoeven <geert+renesas@glider.be>.
>>>>
>>>> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>>>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>>>> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
>>>> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
>>>> Cc: Rob Herring <robh@kernel.org>
>>>> Cc: Simon Horman <horms+renesas@verge.net.au>
>>>> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
>>>> Cc: linux-renesas-soc@vger.kernel.org
>>>> Cc: linux-arm-kernel@lists.infradead.org
>>>
>>> Were you able to do some testing using EXIO connectors? Would be nice to
>>> know what was tested.
>>
>> Not on the M3N, since I don't see it broken out on the EXIO ; is it
>> really there ? It'd be easy to test on M3NSK with KF, but I don't have
>> either KF or M3NSK.
> 
> Please have a look at EXIO Connector D, pins 13/14/15.

That's LBSC WE1n/WE0n/CS0n on S-XS . Is there something I obviously
don't see ?
Geert Uytterhoeven Nov. 21, 2018, 7:37 a.m. UTC | #5
Hi Marek,

On Wed, Nov 21, 2018 at 12:33 AM Marek Vasut <marek.vasut@gmail.com> wrote:
> On 11/19/2018 10:00 AM, Geert Uytterhoeven wrote:
> > On Mon, Nov 19, 2018 at 12:46 AM Marek Vasut <marek.vasut@gmail.com> wrote:
> >> On 11/19/2018 12:02 AM, Wolfram Sang wrote:
> >>> On Sun, Nov 18, 2018 at 06:33:26PM +0100, Marek Vasut wrote:
> >>>> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >>>>
> >>>> This patch adds CAN{0,1} controller nodes for the R8A77965 SoC.
> >>>>
> >>>> Based on several similar patches of the R8A7795 device tree
> >>>> by Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> >>>> and Geert Uytterhoeven <geert+renesas@glider.be>.
> >>>>
> >>>> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >>>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> >>>> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> >>>> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> >>>> Cc: Rob Herring <robh@kernel.org>
> >>>> Cc: Simon Horman <horms+renesas@verge.net.au>
> >>>> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> >>>> Cc: linux-renesas-soc@vger.kernel.org
> >>>> Cc: linux-arm-kernel@lists.infradead.org
> >>>
> >>> Were you able to do some testing using EXIO connectors? Would be nice to
> >>> know what was tested.
> >>
> >> Not on the M3N, since I don't see it broken out on the EXIO ; is it
> >> really there ? It'd be easy to test on M3NSK with KF, but I don't have
> >> either KF or M3NSK.
> >
> > Please have a look at EXIO Connector D, pins 13/14/15.
>
> That's LBSC WE1n/WE0n/CS0n on S-XS . Is there something I obviously
> don't see ?

Unless you connect an expansion card to the Ex Memory Connector,
these signals are free to use, and can be pinmuxed to a CAN function.

Gr{oetje,eeting}s,

                        Geert
Marek Vasut Dec. 5, 2018, 4:50 p.m. UTC | #6
On 11/21/2018 08:37 AM, Geert Uytterhoeven wrote:
> Hi Marek,

Hi,

> On Wed, Nov 21, 2018 at 12:33 AM Marek Vasut <marek.vasut@gmail.com> wrote:
>> On 11/19/2018 10:00 AM, Geert Uytterhoeven wrote:
>>> On Mon, Nov 19, 2018 at 12:46 AM Marek Vasut <marek.vasut@gmail.com> wrote:
>>>> On 11/19/2018 12:02 AM, Wolfram Sang wrote:
>>>>> On Sun, Nov 18, 2018 at 06:33:26PM +0100, Marek Vasut wrote:
>>>>>> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>>>>>>
>>>>>> This patch adds CAN{0,1} controller nodes for the R8A77965 SoC.
>>>>>>
>>>>>> Based on several similar patches of the R8A7795 device tree
>>>>>> by Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>>>>>> and Geert Uytterhoeven <geert+renesas@glider.be>.
>>>>>>
>>>>>> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>>>>>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>>>>>> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
>>>>>> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
>>>>>> Cc: Rob Herring <robh@kernel.org>
>>>>>> Cc: Simon Horman <horms+renesas@verge.net.au>
>>>>>> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
>>>>>> Cc: linux-renesas-soc@vger.kernel.org
>>>>>> Cc: linux-arm-kernel@lists.infradead.org
>>>>>
>>>>> Were you able to do some testing using EXIO connectors? Would be nice to
>>>>> know what was tested.
>>>>
>>>> Not on the M3N, since I don't see it broken out on the EXIO ; is it
>>>> really there ? It'd be easy to test on M3NSK with KF, but I don't have
>>>> either KF or M3NSK.
>>>
>>> Please have a look at EXIO Connector D, pins 13/14/15.
>>
>> That's LBSC WE1n/WE0n/CS0n on S-XS . Is there something I obviously
>> don't see ?
> 
> Unless you connect an expansion card to the Ex Memory Connector,
> these signals are free to use, and can be pinmuxed to a CAN function.

Tested-by: Marek Vasut <marek.vasut@gmail.com>

on M3N Salvator-XS with a rats-nest MCP2551 setup on EXIO-D and Peak
CANFD USB.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
index 3a958fb25245..3485624921bf 100644
--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
@@ -907,13 +907,35 @@ 
 		};
 
 		can0: can@e6c30000 {
+			compatible = "renesas,can-r8a77965",
+				     "renesas,rcar-gen3-can";
 			reg = <0 0xe6c30000 0 0x1000>;
-			/* placeholder */
+			interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 916>,
+			       <&cpg CPG_CORE R8A77965_CLK_CANFD>,
+			       <&can_clk>;
+			clock-names = "clkp1", "clkp2", "can_clk";
+			assigned-clocks = <&cpg CPG_CORE R8A77965_CLK_CANFD>;
+			assigned-clock-rates = <40000000>;
+			power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
+			resets = <&cpg 916>;
+			status = "disabled";
 		};
 
 		can1: can@e6c38000 {
+			compatible = "renesas,can-r8a77965",
+				     "renesas,rcar-gen3-can";
 			reg = <0 0xe6c38000 0 0x1000>;
-			/* placeholder */
+			interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 915>,
+			       <&cpg CPG_CORE R8A77965_CLK_CANFD>,
+			       <&can_clk>;
+			clock-names = "clkp1", "clkp2", "can_clk";
+			assigned-clocks = <&cpg CPG_CORE R8A77965_CLK_CANFD>;
+			assigned-clock-rates = <40000000>;
+			power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
+			resets = <&cpg 915>;
+			status = "disabled";
 		};
 
 		pwm0: pwm@e6e30000 {