* [PATCH 0/2] ARM: dts: r8a7793: add CAN to device tree @ 2016-03-14 2:29 Simon Horman 2016-03-14 2:29 ` [PATCH 1/2] ARM: dts: r8a7794: add CAN clocks " Simon Horman 2016-03-14 2:29 ` [PATCH 2/2] ARM: dts: r8a7794: add CAN nodes " Simon Horman 0 siblings, 2 replies; 9+ messages in thread From: Simon Horman @ 2016-03-14 2:29 UTC (permalink / raw) To: linux-arm-kernel Hi, this short series adds CAN clocks and nodes to the r8a7794 device tree. I am not aware of an r8a7794 board that exposes CAN - neither the alt nor the silk board appear to - and thus am unsure of a way to test these changes. However, they are based on what is present for the r8a7791 SoC and I am unable to find a difference in the SoC documentation. This series is similar to a similar series I posted for the r8a7793 in January. Based on renesas-devel-20160311-v4.5-rc7. Simon Horman (2): ARM: dts: r8a7794: add CAN clocks to device tree ARM: dts: r8a7794: add CAN nodes to device tree arch/arm/boot/dts/r8a7794.dtsi | 45 +++++++++++++++++++++++++++++-- include/dt-bindings/clock/r8a7794-clock.h | 3 +++ 2 files changed, 46 insertions(+), 2 deletions(-) -- 2.1.4 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] ARM: dts: r8a7794: add CAN clocks to device tree 2016-03-14 2:29 [PATCH 0/2] ARM: dts: r8a7793: add CAN to device tree Simon Horman @ 2016-03-14 2:29 ` Simon Horman 2016-03-14 9:23 ` Geert Uytterhoeven 2016-03-14 2:29 ` [PATCH 2/2] ARM: dts: r8a7794: add CAN nodes " Simon Horman 1 sibling, 1 reply; 9+ messages in thread From: Simon Horman @ 2016-03-14 2:29 UTC (permalink / raw) To: linux-arm-kernel Add CAN nodes to r8a7794 device tree. Based on work by Sergei Shtylyov for the r8a7791 SoC. Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- arch/arm/boot/dts/r8a7794.dtsi | 23 +++++++++++++++++++++-- include/dt-bindings/clock/r8a7794-clock.h | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi index eacb2b291361..c8742a599330 100644 --- a/arch/arm/boot/dts/r8a7794.dtsi +++ b/arch/arm/boot/dts/r8a7794.dtsi @@ -844,6 +844,24 @@ clock-output-names = "extal"; }; + /* 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 overridden by the board. */ + clock-frequency = <0>; + clock-output-names = "can_clk"; + status = "disabled"; + }; + /* External SCIF clock */ scif_clk: scif { compatible = "fixed-clock"; @@ -858,10 +876,11 @@ compatible = "renesas,r8a7794-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", "z"; + "lb", "qspi", "sdh", "sd0", "z", + "rcan"; #power-domain-cells = <0>; }; /* Variable factor clocks */ diff --git a/include/dt-bindings/clock/r8a7794-clock.h b/include/dt-bindings/clock/r8a7794-clock.h index f843de6bf377..222a9dcbabb8 100644 --- a/include/dt-bindings/clock/r8a7794-clock.h +++ b/include/dt-bindings/clock/r8a7794-clock.h @@ -21,6 +21,7 @@ #define R8A7794_CLK_SDH 6 #define R8A7794_CLK_SD0 7 #define R8A7794_CLK_Z 8 +#define R8A7794_CLK_RCAN 9 /* MSTP0 */ #define R8A7794_CLK_MSIOF0 0 -- 2.1.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/2] ARM: dts: r8a7794: add CAN clocks to device tree 2016-03-14 2:29 ` [PATCH 1/2] ARM: dts: r8a7794: add CAN clocks " Simon Horman @ 2016-03-14 9:23 ` Geert Uytterhoeven 2016-03-14 23:56 ` Simon Horman 0 siblings, 1 reply; 9+ messages in thread From: Geert Uytterhoeven @ 2016-03-14 9:23 UTC (permalink / raw) To: linux-arm-kernel Hi Simon, On Mon, Mar 14, 2016 at 3:29 AM, Simon Horman <horms+renesas@verge.net.au> wrote: > --- a/arch/arm/boot/dts/r8a7794.dtsi > +++ b/arch/arm/boot/dts/r8a7794.dtsi > @@ -844,6 +844,24 @@ > clock-output-names = "extal"; > }; > > + /* 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"; "clock-output-names" is optional these days, so please drop it. The clock will be named after the node name, so please rename it to "usb_extal". > + }; > + > + /* External CAN clock */ > + can_clk: can_clk { can_clk: can { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + /* This value must be overridden by the board. */ > + clock-frequency = <0>; > + clock-output-names = "can_clk"; Likewise. > + status = "disabled"; > + }; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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] 9+ messages in thread
* [PATCH 1/2] ARM: dts: r8a7794: add CAN clocks to device tree 2016-03-14 9:23 ` Geert Uytterhoeven @ 2016-03-14 23:56 ` Simon Horman 2016-03-15 7:28 ` Geert Uytterhoeven 0 siblings, 1 reply; 9+ messages in thread From: Simon Horman @ 2016-03-14 23:56 UTC (permalink / raw) To: linux-arm-kernel On Mon, Mar 14, 2016 at 10:23:01AM +0100, Geert Uytterhoeven wrote: > Hi Simon, > > On Mon, Mar 14, 2016 at 3:29 AM, Simon Horman > <horms+renesas@verge.net.au> wrote: > > --- a/arch/arm/boot/dts/r8a7794.dtsi > > +++ b/arch/arm/boot/dts/r8a7794.dtsi > > @@ -844,6 +844,24 @@ > > clock-output-names = "extal"; > > }; > > > > + /* 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"; > > "clock-output-names" is optional these days, so please drop it. Thanks, I will drop it from this patch. Do we have a plan to remove it from existing nodes? Should I do a sweep of the Renesas DTS files? And in particular, should it be removed from cpg_clocks ? > The clock will be named after the node name, so please rename it to > "usb_extal". Thanks, will do. Likewise for the changes requested below. > > + }; > > + > > + /* External CAN clock */ > > + can_clk: can_clk { > > can_clk: can { > > > + compatible = "fixed-clock"; > > + #clock-cells = <0>; > > + /* This value must be overridden by the board. */ > > + clock-frequency = <0>; > > + clock-output-names = "can_clk"; > > Likewise. > > > + status = "disabled"; > > + }; ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] ARM: dts: r8a7794: add CAN clocks to device tree 2016-03-14 23:56 ` Simon Horman @ 2016-03-15 7:28 ` Geert Uytterhoeven 2016-03-15 8:02 ` Simon Horman 0 siblings, 1 reply; 9+ messages in thread From: Geert Uytterhoeven @ 2016-03-15 7:28 UTC (permalink / raw) To: linux-arm-kernel Hi Simon, On Tue, Mar 15, 2016 at 12:56 AM, Simon Horman <horms@verge.net.au> wrote: > On Mon, Mar 14, 2016 at 10:23:01AM +0100, Geert Uytterhoeven wrote: >> On Mon, Mar 14, 2016 at 3:29 AM, Simon Horman >> <horms+renesas@verge.net.au> wrote: >> > --- a/arch/arm/boot/dts/r8a7794.dtsi >> > +++ b/arch/arm/boot/dts/r8a7794.dtsi >> > @@ -844,6 +844,24 @@ >> > clock-output-names = "extal"; >> > }; >> > >> > + /* 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"; >> >> "clock-output-names" is optional these days, so please drop it. > > Thanks, I will drop it from this patch. > > Do we have a plan to remove it from existing nodes? > Should I do a sweep of the Renesas DTS files? That's up to you. It's more churn, but from the other side, it avoids people copying deprecated practices. > And in particular, should it be removed from cpg_clocks ? It's not optional for clocks with multiple outputs, cfr. the issues we had with cpg_clocks on H3, before the advent of the CPG/MSSR driver. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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] 9+ messages in thread
* [PATCH 1/2] ARM: dts: r8a7794: add CAN clocks to device tree 2016-03-15 7:28 ` Geert Uytterhoeven @ 2016-03-15 8:02 ` Simon Horman 0 siblings, 0 replies; 9+ messages in thread From: Simon Horman @ 2016-03-15 8:02 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 15, 2016 at 08:28:42AM +0100, Geert Uytterhoeven wrote: > Hi Simon, > > On Tue, Mar 15, 2016 at 12:56 AM, Simon Horman <horms@verge.net.au> wrote: > > On Mon, Mar 14, 2016 at 10:23:01AM +0100, Geert Uytterhoeven wrote: > >> On Mon, Mar 14, 2016 at 3:29 AM, Simon Horman > >> <horms+renesas@verge.net.au> wrote: > >> > --- a/arch/arm/boot/dts/r8a7794.dtsi > >> > +++ b/arch/arm/boot/dts/r8a7794.dtsi > >> > @@ -844,6 +844,24 @@ > >> > clock-output-names = "extal"; > >> > }; > >> > > >> > + /* 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"; > >> > >> "clock-output-names" is optional these days, so please drop it. > > > > Thanks, I will drop it from this patch. > > > > Do we have a plan to remove it from existing nodes? > > Should I do a sweep of the Renesas DTS files? > > That's up to you. > > It's more churn, but from the other side, it avoids people copying deprecated > practices. Thanks, I'll tentatively add it to my todo list. I think its worth avoiding the copies. > > And in particular, should it be removed from cpg_clocks ? > > It's not optional for clocks with multiple outputs, cfr. the issues we > had with cpg_clocks on H3, before the advent of the CPG/MSSR driver. Understood. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] ARM: dts: r8a7794: add CAN nodes to device tree 2016-03-14 2:29 [PATCH 0/2] ARM: dts: r8a7793: add CAN to device tree Simon Horman 2016-03-14 2:29 ` [PATCH 1/2] ARM: dts: r8a7794: add CAN clocks " Simon Horman @ 2016-03-14 2:29 ` Simon Horman 2016-03-14 9:28 ` Geert Uytterhoeven 1 sibling, 1 reply; 9+ messages in thread From: Simon Horman @ 2016-03-14 2:29 UTC (permalink / raw) To: linux-arm-kernel Add CAN nodes to r8a7794 device tree. Based on work by Sergei Shtylyov for the r8a7791 SoC. Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- arch/arm/boot/dts/r8a7794.dtsi | 22 ++++++++++++++++++++++ include/dt-bindings/clock/r8a7794-clock.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi index c8742a599330..ab755b754a9e 100644 --- a/arch/arm/boot/dts/r8a7794.dtsi +++ b/arch/arm/boot/dts/r8a7794.dtsi @@ -830,6 +830,28 @@ }; }; + can0: can at e6e80000 { + compatible = "renesas,can-r8a7794", "renesas,rcar-gen2-can"; + reg = <0 0xe6e80000 0 0x1000>; + interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R8A7794_CLK_RCAN0>, + <&cpg_clocks R8A7794_CLK_RCAN>, <&can_clk>; + clock-names = "clkp1", "clkp2", "can_clk"; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; + + can1: can at e6e88000 { + compatible = "renesas,can-r8a7794", "renesas,rcar-gen2-can"; + reg = <0 0xe6e88000 0 0x1000>; + interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R8A7794_CLK_RCAN1>, + <&cpg_clocks R8A7794_CLK_RCAN>, <&can_clk>; + clock-names = "clkp1", "clkp2", "can_clk"; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; + clocks { #address-cells = <2>; #size-cells = <2>; diff --git a/include/dt-bindings/clock/r8a7794-clock.h b/include/dt-bindings/clock/r8a7794-clock.h index 222a9dcbabb8..9703fbdb81c8 100644 --- a/include/dt-bindings/clock/r8a7794-clock.h +++ b/include/dt-bindings/clock/r8a7794-clock.h @@ -96,6 +96,8 @@ #define R8A7794_CLK_GPIO2 10 #define R8A7794_CLK_GPIO1 11 #define R8A7794_CLK_GPIO0 12 +#define R8A7794_CLK_RCAN1 15 +#define R8A7794_CLK_RCAN0 16 #define R8A7794_CLK_QSPI_MOD 17 #define R8A7794_CLK_I2C5 25 #define R8A7794_CLK_I2C4 27 -- 2.1.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] ARM: dts: r8a7794: add CAN nodes to device tree 2016-03-14 2:29 ` [PATCH 2/2] ARM: dts: r8a7794: add CAN nodes " Simon Horman @ 2016-03-14 9:28 ` Geert Uytterhoeven 2016-03-15 0:23 ` Simon Horman 0 siblings, 1 reply; 9+ messages in thread From: Geert Uytterhoeven @ 2016-03-14 9:28 UTC (permalink / raw) To: linux-arm-kernel Hi Simon, On Mon, Mar 14, 2016 at 3:29 AM, Simon Horman <horms+renesas@verge.net.au> wrote: > Add CAN nodes to r8a7794 device tree. > > Based on work by Sergei Shtylyov for the r8a7791 SoC. > > Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > arch/arm/boot/dts/r8a7794.dtsi | 22 ++++++++++++++++++++++ > include/dt-bindings/clock/r8a7794-clock.h | 2 ++ > 2 files changed, 24 insertions(+) > > diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi > index c8742a599330..ab755b754a9e 100644 > --- a/arch/arm/boot/dts/r8a7794.dtsi > +++ b/arch/arm/boot/dts/r8a7794.dtsi > @@ -830,6 +830,28 @@ > }; > }; > > + can0: can at e6e80000 { > + compatible = "renesas,can-r8a7794", "renesas,rcar-gen2-can"; > + reg = <0 0xe6e80000 0 0x1000>; > + interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&mstp9_clks R8A7794_CLK_RCAN0>, I don't think mstp9_clks already defines the can module clocks? > + <&cpg_clocks R8A7794_CLK_RCAN>, <&can_clk>; > + clock-names = "clkp1", "clkp2", "can_clk"; > + power-domains = <&cpg_clocks>; > + status = "disabled"; > + }; > + > + can1: can at e6e88000 { > + compatible = "renesas,can-r8a7794", "renesas,rcar-gen2-can"; > + reg = <0 0xe6e88000 0 0x1000>; > + interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&mstp9_clks R8A7794_CLK_RCAN1>, Likewise. > + <&cpg_clocks R8A7794_CLK_RCAN>, <&can_clk>; > + clock-names = "clkp1", "clkp2", "can_clk"; > + power-domains = <&cpg_clocks>; > + status = "disabled"; > + }; > + > clocks { > #address-cells = <2>; > #size-cells = <2>; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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] 9+ messages in thread
* [PATCH 2/2] ARM: dts: r8a7794: add CAN nodes to device tree 2016-03-14 9:28 ` Geert Uytterhoeven @ 2016-03-15 0:23 ` Simon Horman 0 siblings, 0 replies; 9+ messages in thread From: Simon Horman @ 2016-03-15 0:23 UTC (permalink / raw) To: linux-arm-kernel On Mon, Mar 14, 2016 at 10:28:40AM +0100, Geert Uytterhoeven wrote: > Hi Simon, > > On Mon, Mar 14, 2016 at 3:29 AM, Simon Horman > <horms+renesas@verge.net.au> wrote: > > Add CAN nodes to r8a7794 device tree. > > > > Based on work by Sergei Shtylyov for the r8a7791 SoC. > > > > Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > > > --- > > arch/arm/boot/dts/r8a7794.dtsi | 22 ++++++++++++++++++++++ > > include/dt-bindings/clock/r8a7794-clock.h | 2 ++ > > 2 files changed, 24 insertions(+) > > > > diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi > > index c8742a599330..ab755b754a9e 100644 > > --- a/arch/arm/boot/dts/r8a7794.dtsi > > +++ b/arch/arm/boot/dts/r8a7794.dtsi > > @@ -830,6 +830,28 @@ > > }; > > }; > > > > + can0: can at e6e80000 { > > + compatible = "renesas,can-r8a7794", "renesas,rcar-gen2-can"; > > + reg = <0 0xe6e80000 0 0x1000>; > > + interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&mstp9_clks R8A7794_CLK_RCAN0>, > > I don't think mstp9_clks already defines the can module clocks? Oops, I will add them. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-03-15 8:02 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-14 2:29 [PATCH 0/2] ARM: dts: r8a7793: add CAN to device tree Simon Horman 2016-03-14 2:29 ` [PATCH 1/2] ARM: dts: r8a7794: add CAN clocks " Simon Horman 2016-03-14 9:23 ` Geert Uytterhoeven 2016-03-14 23:56 ` Simon Horman 2016-03-15 7:28 ` Geert Uytterhoeven 2016-03-15 8:02 ` Simon Horman 2016-03-14 2:29 ` [PATCH 2/2] ARM: dts: r8a7794: add CAN nodes " Simon Horman 2016-03-14 9:28 ` Geert Uytterhoeven 2016-03-15 0:23 ` Simon Horman
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).