mbox series

[v4,0/4] can: rcar_canfd: Add support for V3U flavor

Message ID 20220309162609.3726306-1-uli+renesas@fpond.eu (mailing list archive)
Headers show
Series can: rcar_canfd: Add support for V3U flavor | expand

Message

Ulrich Hecht March 9, 2022, 4:26 p.m. UTC
Hi!

This adds CANFD support for V3U (R8A779A0) SoCs. The V3U's IP supports up
to eight channels and has some other minor differences to the Gen3 variety:

- changes to some register offsets and layouts
- absence of "classic CAN" registers, both modes are handled through the
  CANFD register set

This patch set tries to accommodate these changes in a minimally intrusive
way.

This revision tries to address the remaining style issues raised by
reviewers. Thanks to Vincent, Marc and Simon for their reviews and
suggestions.

It has been successfully tested remotely on a V3U Falcon board, but only
with channels 0 and 1. We were not able to get higher channels to work in
both directions yet. It is not currently clear if this is an issue with the
driver, the board or the silicon, but the BSP vendor driver only works with
channels 0 and 1 as well, so my bet is on one of the latter. For this
reason, this series only enables known-working channels 0 and 1 on Falcon.

CU
Uli


Changes since v3:
- reformatted large macros for better readability
- made gpriv parameter explicit in all macros that use it
- other minor style adjustments

Changes since v2:
- dropped upstreamed clock patch
- replaced bracket/ternary maze with inline functions
- improved indentation to better reflect the logic
- removed redundant CAN mode check
- replaced strcpy() with initializer
- minor refactoring
- add Reviewed-Bys

Changes since v1:
- clk: added missing CANFD module clock
- driver: fixed tests for RZ/G2L so they won't break V3U
- driver: simplified two macros
- DT: enabled devices 0 and 1 on Falcon board
- DT: changed assigned-clock-rates to 80000000
- DT: added interrupt names


Ulrich Hecht (4):
  can: rcar_canfd: Add support for r8a779a0 SoC
  arm64: dts: renesas: r8a779a0: Add CANFD device node
  arm64: dts: renesas: r8a779a0-falcon: enable CANFD 0 and 1
  dt-bindings: can: renesas,rcar-canfd: Document r8a779a0 support

 .../bindings/net/can/renesas,rcar-canfd.yaml  |   2 +
 .../boot/dts/renesas/r8a779a0-falcon.dts      |  24 ++
 arch/arm64/boot/dts/renesas/r8a779a0.dtsi     |  56 +++
 drivers/net/can/rcar/rcar_canfd.c             | 353 +++++++++++-------
 4 files changed, 299 insertions(+), 136 deletions(-)

Comments

Marc Kleine-Budde March 10, 2022, 8:25 a.m. UTC | #1
On 09.03.2022 17:26:05, Ulrich Hecht wrote:
> This adds CANFD support for V3U (R8A779A0) SoCs. The V3U's IP supports up
> to eight channels and has some other minor differences to the Gen3 variety:
> 
> - changes to some register offsets and layouts
> - absence of "classic CAN" registers, both modes are handled through the
>   CANFD register set
> 
> This patch set tries to accommodate these changes in a minimally intrusive
> way.
> 
> This revision tries to address the remaining style issues raised by
> reviewers. Thanks to Vincent, Marc and Simon for their reviews and
> suggestions.
> 
> It has been successfully tested remotely on a V3U Falcon board, but only
> with channels 0 and 1. We were not able to get higher channels to work in
> both directions yet. It is not currently clear if this is an issue with the
> driver, the board or the silicon, but the BSP vendor driver only works with
> channels 0 and 1 as well, so my bet is on one of the latter. For this
> reason, this series only enables known-working channels 0 and 1 on Falcon.

Should I take the whole series via linux-can/next?

Marc
Ulrich Hecht March 10, 2022, 8:32 a.m. UTC | #2
> On 03/10/2022 9:25 AM Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> 
>  
> On 09.03.2022 17:26:05, Ulrich Hecht wrote:
> > This adds CANFD support for V3U (R8A779A0) SoCs. The V3U's IP supports up
> > to eight channels and has some other minor differences to the Gen3 variety:
> 
> Should I take the whole series via linux-can/next?

That would be great, thanks.

CU
Uli
Geert Uytterhoeven March 10, 2022, 8:45 a.m. UTC | #3
Hi Marc,

On Thu, Mar 10, 2022 at 9:26 AM Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> On 09.03.2022 17:26:05, Ulrich Hecht wrote:
> > This adds CANFD support for V3U (R8A779A0) SoCs. The V3U's IP supports up
> > to eight channels and has some other minor differences to the Gen3 variety:
> >
> > - changes to some register offsets and layouts
> > - absence of "classic CAN" registers, both modes are handled through the
> >   CANFD register set
> >
> > This patch set tries to accommodate these changes in a minimally intrusive
> > way.
> >
> > This revision tries to address the remaining style issues raised by
> > reviewers. Thanks to Vincent, Marc and Simon for their reviews and
> > suggestions.
> >
> > It has been successfully tested remotely on a V3U Falcon board, but only
> > with channels 0 and 1. We were not able to get higher channels to work in
> > both directions yet. It is not currently clear if this is an issue with the
> > driver, the board or the silicon, but the BSP vendor driver only works with
> > channels 0 and 1 as well, so my bet is on one of the latter. For this
> > reason, this series only enables known-working channels 0 and 1 on Falcon.
>
> Should I take the whole series via linux-can/next?

Please don't take the DTS changes.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
Marc Kleine-Budde March 10, 2022, 8:50 a.m. UTC | #4
On 10.03.2022 09:45:50, Geert Uytterhoeven wrote:
> Hi Marc,
> 
> On Thu, Mar 10, 2022 at 9:26 AM Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> > On 09.03.2022 17:26:05, Ulrich Hecht wrote:
> > > This adds CANFD support for V3U (R8A779A0) SoCs. The V3U's IP supports up
> > > to eight channels and has some other minor differences to the Gen3 variety:
> > >
> > > - changes to some register offsets and layouts
> > > - absence of "classic CAN" registers, both modes are handled through the
> > >   CANFD register set
> > >
> > > This patch set tries to accommodate these changes in a minimally intrusive
> > > way.
> > >
> > > This revision tries to address the remaining style issues raised by
> > > reviewers. Thanks to Vincent, Marc and Simon for their reviews and
> > > suggestions.
> > >
> > > It has been successfully tested remotely on a V3U Falcon board, but only
> > > with channels 0 and 1. We were not able to get higher channels to work in
> > > both directions yet. It is not currently clear if this is an issue with the
> > > driver, the board or the silicon, but the BSP vendor driver only works with
> > > channels 0 and 1 as well, so my bet is on one of the latter. For this
> > > reason, this series only enables known-working channels 0 and 1 on Falcon.
> >
> > Should I take the whole series via linux-can/next?
> 
> Please don't take the DTS changes.

Ok, I'm taking the yaml update and the driver changes.

regards,
Marc
patchwork-bot+netdevbpf@kernel.org March 11, 2022, 4:20 a.m. UTC | #5
Hello:

This series was applied to netdev/net-next.git (master)
by Marc Kleine-Budde <mkl@pengutronix.de>:

On Wed,  9 Mar 2022 17:26:05 +0100 you wrote:
> Hi!
> 
> This adds CANFD support for V3U (R8A779A0) SoCs. The V3U's IP supports up
> to eight channels and has some other minor differences to the Gen3 variety:
> 
> - changes to some register offsets and layouts
> - absence of "classic CAN" registers, both modes are handled through the
>   CANFD register set
> 
> [...]

Here is the summary with links:
  - [v4,1/4] can: rcar_canfd: Add support for r8a779a0 SoC
    https://git.kernel.org/netdev/net-next/c/45721c406dcf
  - [v4,2/4] arm64: dts: renesas: r8a779a0: Add CANFD device node
    (no matching commit)
  - [v4,3/4] arm64: dts: renesas: r8a779a0-falcon: enable CANFD 0 and 1
    (no matching commit)
  - [v4,4/4] dt-bindings: can: renesas,rcar-canfd: Document r8a779a0 support
    https://git.kernel.org/netdev/net-next/c/d6254d52d70d

You are awesome, thank you!