v3u: add support for TPU
cover v3u: add support for TPU
Here is the series with patches for Geert to enable TPU on V3U. I took the DTS patches from the BSP, the rest was developed on mainline tree. Patch 3 enables it on the Falcon board where it will be available on the GPIO connector CN4. Otherwise, it is not actively used on that platform. Not essential, but nice to have, I'd say.
Tested remotely using the sloppy GPIO logic analyzer. Pulses could be traced and changes to period and duty cycles showed up in the scopes as well.
Duc Nguyen (2):
arm64: dts: renesas: r8a779a0: Add TPU node
arm64: dts: r8a779a0-falcon-cpu: Add TPU support
Wolfram Sang (1):
clk: renesas: r8a779a0: Add TPU clock
arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi | 12 ++++++++++++ arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 11 +++++++++++ drivers/clk/renesas/r8a779a0-cpg-mssr.c | 1 + 3 files changed, 24 insertions(+)
Signature · 1 line
2.30.2
PATCH 1/3 clk: renesas: r8a779a0: Add TPU clock
--- drivers/clk/renesas/r8a779a0-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/renesas/r8a779a0-cpg-mssr.c +1 -0
@@ -202,6 +202,7 @@ static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {DEF_MOD ("tmu2" ,715 ,R8A779A0_CLK_S1D4 ),DEF_MOD ("tmu3" ,716 ,R8A779A0_CLK_S1D4 ),DEF_MOD ("tmu4" ,717 ,R8A779A0_CLK_S1D4 ), +DEF_MOD ("tpu0" ,718 ,R8A779A0_CLK_S1D8 ),DEF_MOD ("vin00" ,730 ,R8A779A0_CLK_S1D1 ),DEF_MOD ("vin01" ,731 ,R8A779A0_CLK_S1D1 ), DEF_MOD("vin02", 800, R8A779A0_CLK_S1D1),
Signature · 1 line
2.30.2
Re: [PATCH 1/3] clk: renesas: r8a779a0: Add TPU clock
Quoted 1 line · Wolfram Sang
Signed-off-by Wolfram Sang <[email protected]>
i.e. will queue in renesas-clk-for-v5.16.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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
PATCH 2/3 arm64: dts: renesas: r8a779a0: Add TPU node
In reply to Wolfram SangFrom: Duc Nguyen <[email protected]>
This patch adds TPU node for R-Car V3U (r8a779a0) SoC.
--- arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/renesas/r8a779a0.dtsi +11 -0
@@ -1023,6 +1023,17 @@ msiof5: spi@e6c28000 { status = "disabled"; }; + tpu: pwm@e6e80000 { + compatible = "renesas,tpu-r8a779a0", "renesas,tpu"; + reg = <0 0xe6e80000 0 0x148>; + interrupts = <GIC_SPI 515 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 718>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 718>; + #pwm-cells = <3>; + status = "disabled"; + }; + dmac1: dma-controller@e7350000 { compatible = "renesas,dmac-r8a779a0"; reg = <0 0xe7350000 0 0x1000>,
Signature · 1 line
2.30.2
Re: [PATCH 2/3] arm64: dts: renesas: r8a779a0: Add TPU node
Quoted 7 lines · Wolfram Sang
From: Duc Nguyen <[email protected]>
This patch adds TPU node for R-Car V3U (r8a779a0) SoC.
Signed-off-by Duc Nguyen <[email protected]>Signed-off-by LUU HOAI <[email protected]>Signed-off-by Wolfram Sang <[email protected]>
i.e. will queue in renesas-devel for v5.16.
arch/arm64/boot/dts/renesas/r8a779a0.dtsi msiof5: spi@e6c28000 { · line 1026
Quoted 7 lines
arch/arm64/boot/dts/renesas/r8a779a0.dtsi +1
-0@@ -1023,6 +1023,17 @@ msiof5: spi@e6c28000 { status = "disabled"; }; + tpu: pwm@e6e80000 {
I'll move this just before "msiof0: spi@e6e90000" while applying, to preserve sort order.
arch/arm64/boot/dts/renesas/r8a779a0.dtsi msiof5: spi@e6c28000 { · line 1039
Quoted 13 lines
arch/arm64/boot/dts/renesas/r8a779a0.dtsi +10
-0+ compatible = "renesas,tpu-r8a779a0", "renesas,tpu"; + reg = <0 0xe6e80000 0 0x148>; + interrupts = <GIC_SPI 515 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 718>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 718>; + #pwm-cells = <3>; + status = "disabled"; + }; + dmac1: dma-controller@e7350000 { compatible = "renesas,dmac-r8a779a0"; reg = <0 0xe7350000 0 0x1000>,
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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
RFC PATCH 3/3 arm64: dts: r8a779a0-falcon-cpu: Add TPU support
In reply to Wolfram SangFrom: Duc Nguyen <[email protected]>
This patch enables TPU channel 1 for the Falcon board.
---
Do we want this activated upstream? I think it is nice to have.
arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi +12 -0
@@ -175,6 +175,11 @@ scif_clk_pins: scif_clk { groups = "scif_clk"; function = "scif_clk"; }; + + tpu_pin: tpu { + groups = "tpu_to1"; + function = "tpu"; + }; }; &rwdt {
@@ -193,3 +198,10 @@ &scif0 { &scif_clk { clock-frequency = <24000000>; }; + +&tpu { + pinctrl-0 = <&tpu_pin>; + pinctrl-names = "default"; + + status = "okay"; +};
Signature · 1 line
2.30.2
Re: [RFC PATCH 3/3] arm64: dts: r8a779a0-falcon-cpu: Add TPU support
Hi Wolfram,
Quoted 6 lines · Wolfram Sang
From: Duc Nguyen <[email protected]>
This patch enables TPU channel 1 for the Falcon board.
Signed-off-by Duc Nguyen <[email protected]>Signed-off-by Wolfram Sang <[email protected]>
Quoted 1 line
Do we want this activated upstream? I think it is nice to have.
I don't think so, as there is no actual user.
It could be enabled in a DT overlay describing a board connected to CN4. Or just a simple overlay for testing TPU on CN4. I'd be happy to add the latter to
https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/renesas-overlays
Thanks!
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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
Re: [RFC PATCH 3/3] arm64: dts: r8a779a0-falcon-cpu: Add TPU support
Quoted 4 lines
Quoted 2 lines
Do we want this activated upstream? I think it is nice to have.
I don't think so, as there is no actual user.
OK.
Quoted 4 lines
It could be enabled in a DT overlay describing a board connected to CN4. Or just a simple overlay for testing TPU on CN4. I'd be happy to add the latter to
https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/renesas-overlays
With the same argument, let's see if someones actually wants to use it and adds it as an overly then.
Thanks for fixing the sorting in patch 2/3!