* [PATCH 0/2] Add R8A7790 CAN DT support @ 2014-12-29 22:03 Sergei Shtylyov 2014-12-29 22:04 ` [PATCH 1/2] ARM: shmobile: r8a7790: add CAN clocks Sergei Shtylyov 2014-12-29 22:06 ` [PATCH 2/2] ARM: shmobile: r8a7790: add CAN DT support Sergei Shtylyov 0 siblings, 2 replies; 5+ messages in thread From: Sergei Shtylyov @ 2014-12-29 22:03 UTC (permalink / raw) To: horms, linux-sh, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak, devicetree Cc: magnus.damm, linux, linux-arm-kernel Hello. Here's the set of 2 patches against Simon Horman's 'renesas.git' repo, 'renesas-devel-20141229-v3.19-rc2' tag. Here we add the CAN device tree support for the R8A7790 SoC (unfortunately, it's impossible to test CAN on the Lager board). It depends on the clk driver RCAN clock patch posted recently in order to work. [1/2] ARM: shmobile: r8a7790: add CAN clocks [2/2] ARM: shmobile: r8a7790: add CAN DT support WBR, Sergei ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ARM: shmobile: r8a7790: add CAN clocks 2014-12-29 22:03 [PATCH 0/2] Add R8A7790 CAN DT support Sergei Shtylyov @ 2014-12-29 22:04 ` Sergei Shtylyov 2015-01-05 13:30 ` Geert Uytterhoeven 2014-12-29 22:06 ` [PATCH 2/2] ARM: shmobile: r8a7790: add CAN DT support Sergei Shtylyov 1 sibling, 1 reply; 5+ messages in thread From: Sergei Shtylyov @ 2014-12-29 22:04 UTC (permalink / raw) To: horms, linux-sh, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak, devicetree Cc: magnus.damm, linux, linux-arm-kernel The R-Car CAN controllers can derive the CAN bus clock not only from their peripheral clock input (clkp1) but also from the other internal clock (clkp2) and external clock fed on CAN_CLK pin. Describe those clocks in the device tree, along with the USB_EXTAL clock from which clkp2 is derived. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- arch/arm/boot/dts/r8a7790.dtsi | 22 ++++++++++++++++++++-- include/dt-bindings/clock/r8a7790-clock.h | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) Index: renesas/arch/arm/boot/dts/r8a7790.dtsi =================================================================== --- renesas.orig/arch/arm/boot/dts/r8a7790.dtsi +++ renesas/arch/arm/boot/dts/r8a7790.dtsi @@ -838,16 +838,34 @@ clock-output-names = "audio_clk_c"; }; + /* External USB clock - can be overridden by the board */ + usb_extal_clk: usb_extal_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <48000000>; + clock-output-names = "usb_extal"; + }; + + /* External CAN clock */ + can_clk: can_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + /* This value must be overriden by the board. */ + clock-frequency = <0>; + clock-output-names = "can_clk"; + status = "disabled"; + }; + /* Special CPG clocks */ cpg_clocks: cpg_clocks@e6150000 { compatible = "renesas,r8a7790-cpg-clocks", "renesas,rcar-gen2-cpg-clocks"; reg = <0 0xe6150000 0 0x1000>; - clocks = <&extal_clk>; + clocks = <&extal_clk &usb_extal_clk>; #clock-cells = <1>; clock-output-names = "main", "pll0", "pll1", "pll3", "lb", "qspi", "sdh", "sd0", "sd1", - "z"; + "z", "rcan"; }; /* Variable factor clocks */ Index: renesas/include/dt-bindings/clock/r8a7790-clock.h =================================================================== --- renesas.orig/include/dt-bindings/clock/r8a7790-clock.h +++ renesas/include/dt-bindings/clock/r8a7790-clock.h @@ -21,6 +21,7 @@ #define R8A7790_CLK_SD0 7 #define R8A7790_CLK_SD1 8 #define R8A7790_CLK_Z 9 +#define R8A7790_CLK_RCAN 10 /* MSTP0 */ #define R8A7790_CLK_MSIOF0 0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ARM: shmobile: r8a7790: add CAN clocks 2014-12-29 22:04 ` [PATCH 1/2] ARM: shmobile: r8a7790: add CAN clocks Sergei Shtylyov @ 2015-01-05 13:30 ` Geert Uytterhoeven 0 siblings, 0 replies; 5+ messages in thread From: Geert Uytterhoeven @ 2015-01-05 13:30 UTC (permalink / raw) To: Sergei Shtylyov Cc: Simon Horman, Linux-sh list, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, devicetree@vger.kernel.org, Magnus Damm, Russell King, linux-arm-kernel@lists.infradead.org On Mon, Dec 29, 2014 at 11:04 PM, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: > The R-Car CAN controllers can derive the CAN bus clock not only from their > peripheral clock input (clkp1) but also from the other internal clock (clkp2) > and external clock fed on CAN_CLK pin. Describe those clocks in the device > tree, along with the USB_EXTAL clock from which clkp2 is derived. > > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] ARM: shmobile: r8a7790: add CAN DT support 2014-12-29 22:03 [PATCH 0/2] Add R8A7790 CAN DT support Sergei Shtylyov 2014-12-29 22:04 ` [PATCH 1/2] ARM: shmobile: r8a7790: add CAN clocks Sergei Shtylyov @ 2014-12-29 22:06 ` Sergei Shtylyov 2015-01-05 13:38 ` Geert Uytterhoeven 1 sibling, 1 reply; 5+ messages in thread From: Sergei Shtylyov @ 2014-12-29 22:06 UTC (permalink / raw) To: horms Cc: linux-sh, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm, linux, linux-arm-kernel Define the generic R8A7790 parts of the CAN0/1 device nodes. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- arch/arm/boot/dts/r8a7790.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) Index: renesas/arch/arm/boot/dts/r8a7790.dtsi =================================================================== --- renesas.orig/arch/arm/boot/dts/r8a7790.dtsi +++ renesas/arch/arm/boot/dts/r8a7790.dtsi @@ -792,6 +792,26 @@ }; }; + can0: can@e6e80000 { + compatible = "renesas,can-r8a7790"; + reg = <0 0xe6e80000 0 0x1000>; + interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R8A7790_CLK_RCAN0>, + <&cpg_clocks R8A7790_CLK_RCAN>, <&can_clk>; + clock-names = "clkp1", "clkp2", "can_clk"; + status = "disabled"; + }; + + can1: can@e6e88000 { + compatible = "renesas,can-r8a7790"; + reg = <0 0xe6e88000 0 0x1000>; + interrupts = <0 187 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R8A7790_CLK_RCAN1>, + <&cpg_clocks R8A7790_CLK_RCAN>, <&can_clk>; + clock-names = "clkp1", "clkp2", "can_clk"; + status = "disabled"; + }; + clocks { #address-cells = <2>; #size-cells = <2>; ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ARM: shmobile: r8a7790: add CAN DT support 2014-12-29 22:06 ` [PATCH 2/2] ARM: shmobile: r8a7790: add CAN DT support Sergei Shtylyov @ 2015-01-05 13:38 ` Geert Uytterhoeven 0 siblings, 0 replies; 5+ messages in thread From: Geert Uytterhoeven @ 2015-01-05 13:38 UTC (permalink / raw) To: Sergei Shtylyov Cc: Simon Horman, Linux-sh list, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, devicetree@vger.kernel.org, Magnus Damm, Russell King, linux-arm-kernel@lists.infradead.org On Mon, Dec 29, 2014 at 11:06 PM, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: > Define the generic R8A7790 parts of the CAN0/1 device nodes. > > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Apart from the minor nit below Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- renesas.orig/arch/arm/boot/dts/r8a7790.dtsi > +++ renesas/arch/arm/boot/dts/r8a7790.dtsi > @@ -792,6 +792,26 @@ > }; > }; > > + can0: can@e6e80000 { > + compatible = "renesas,can-r8a7790"; > + reg = <0 0xe6e80000 0 0x1000>; > + interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&mstp9_clks R8A7790_CLK_RCAN0>, > + <&cpg_clocks R8A7790_CLK_RCAN>, <&can_clk>; .git/rebase-apply/patch:18: space before tab in indent. <&cpg_clocks R8A7790_CLK_RCAN>, <&can_clk>; > + clock-names = "clkp1", "clkp2", "can_clk"; > + status = "disabled"; > + }; > + > + can1: can@e6e88000 { > + compatible = "renesas,can-r8a7790"; > + reg = <0 0xe6e88000 0 0x1000>; > + interrupts = <0 187 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&mstp9_clks R8A7790_CLK_RCAN1>, > + <&cpg_clocks R8A7790_CLK_RCAN>, <&can_clk>; .git/rebase-apply/patch:28: space before tab in indent. <&cpg_clocks R8A7790_CLK_RCAN>, <&can_clk>; > + clock-names = "clkp1", "clkp2", "can_clk"; > + status = "disabled"; > + }; 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-05 13:38 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-12-29 22:03 [PATCH 0/2] Add R8A7790 CAN DT support Sergei Shtylyov 2014-12-29 22:04 ` [PATCH 1/2] ARM: shmobile: r8a7790: add CAN clocks Sergei Shtylyov 2015-01-05 13:30 ` Geert Uytterhoeven 2014-12-29 22:06 ` [PATCH 2/2] ARM: shmobile: r8a7790: add CAN DT support Sergei Shtylyov 2015-01-05 13:38 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).