2020-08-25 16:31:16

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 3/4] ARM: dts: r8a7742-iwg21d-q7: Add can0 support to carrier board

This patch enables CAN0 interface exposed through connector J20 on the
carrier board.

Signed-off-by: Lad Prabhakar <[email protected]>
Reviewed-by: Chris Paterson <[email protected]>
---
arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
index e709a132f2f7..070fc9729b39 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
@@ -198,6 +198,13 @@
};
};

+&can0 {
+ pinctrl-0 = <&can0_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
&cmt0 {
status = "okay";
};
@@ -214,6 +221,15 @@
};
};

+&gpio1 {
+ can-trx-en-gpio{
+ gpio-hog;
+ gpios = <28 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "can-trx-en-gpio";
+ };
+};
+
&hsusb {
pinctrl-0 = <&usb0_pins>;
pinctrl-names = "default";
@@ -287,6 +303,11 @@
function = "tpu0";
};

+ can0_pins: can0 {
+ groups = "can0_data_d";
+ function = "can0";
+ };
+
i2c2_pins: i2c2 {
groups = "i2c2_b";
function = "i2c2";
--
2.17.1


2020-09-03 12:29:21

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 3/4] ARM: dts: r8a7742-iwg21d-q7: Add can0 support to carrier board

Hi Prabhakar,

On Tue, Aug 25, 2020 at 6:28 PM Lad Prabhakar
<[email protected]> wrote:
> This patch enables CAN0 interface exposed through connector J20 on the
> carrier board.
>
> Signed-off-by: Lad Prabhakar <[email protected]>
> Reviewed-by: Chris Paterson <[email protected]>

According to my schematics, the CAN port on J20 has its signals named
CAN0_[RT]XD on the carrier board, but connected to CAN1[RT]X (GP4_[67])
on the SoM.

Or am I looking at the wrong file?

> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> @@ -198,6 +198,13 @@
> };
> };
>
> +&can0 {

can1

> + pinctrl-0 = <&can0_pins>;

can1_pins

> + pinctrl-names = "default";
> +
> + status = "okay";
> +};
> +
> &cmt0 {
> status = "okay";
> };

> @@ -287,6 +303,11 @@
> function = "tpu0";
> };
>
> + can0_pins: can0 {
> + groups = "can0_data_d";

can1_data_b

> + function = "can0";
> + };
> +
> i2c2_pins: i2c2 {
> groups = "i2c2_b";
> function = "i2c2";

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2020-09-04 17:22:36

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 3/4] ARM: dts: r8a7742-iwg21d-q7: Add can0 support to carrier board

Hi Geert,

Thank you for the review.

On Thu, Sep 3, 2020 at 1:14 PM Geert Uytterhoeven <[email protected]> wrote:
>
> Hi Prabhakar,
>
> On Tue, Aug 25, 2020 at 6:28 PM Lad Prabhakar
> <[email protected]> wrote:
> > This patch enables CAN0 interface exposed through connector J20 on the
> > carrier board.
> >
> > Signed-off-by: Lad Prabhakar <[email protected]>
> > Reviewed-by: Chris Paterson <[email protected]>
>
> According to my schematics, the CAN port on J20 has its signals named
> CAN0_[RT]XD on the carrier board, but connected to CAN1[RT]X (GP4_[67])
> on the SoM.
>
> Or am I looking at the wrong file?
>
You are correct, I misplaced the node from the carrier board, will post a v2.

Cheers,
Prabhakar

> > --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> > +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> > @@ -198,6 +198,13 @@
> > };
> > };
> >
> > +&can0 {
>
> can1
>
> > + pinctrl-0 = <&can0_pins>;
>
> can1_pins
>
> > + pinctrl-names = "default";
> > +
> > + status = "okay";
> > +};
> > +
> > &cmt0 {
> > status = "okay";
> > };
>
> > @@ -287,6 +303,11 @@
> > function = "tpu0";
> > };
> >
> > + can0_pins: can0 {
> > + groups = "can0_data_d";
>
> can1_data_b
>
> > + function = "can0";
> > + };
> > +
> > i2c2_pins: i2c2 {
> > groups = "i2c2_b";
> > function = "i2c2";
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds