Add R8A7790 CAN DT support
Subsystems (3)
v2 cover Add R8A7790 CAN DT support
Hello.
Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20141231-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 reposted today in order to work.
[1/2] ARM: shmobile: r8a7790: add CAN clocks
[2/2] ARM: shmobile: r8a7790: add CAN DT support
WBR, Sergei
PATCH v2 1/2 ARM: shmobile: r8a7790: add CAN clocks
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.
---
Changes in version 2:
- fixed spelling in the comment to the CAN_CLK node;
- added Geert's ACK.
arch/arm/boot/dts/r8a7790.dtsi | 22 ++++++++++++++++++++-- include/dt-bindings/clock/r8a7790-clock.h | 1 + 2 files changed, 21 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7790.dtsi +20 -2
@@ -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 overridden by the board. */ + clock-frequency = <0>; + clock-output-names = "can_clk"; + status = "disabled"; + }; + /* Special CPG clocks */ cpg_clocks: cpg_clocks at 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 */
include/dt-bindings/clock/r8a7790-clock.h +1 -0
@@ -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
PATCH v2 2/2 ARM: shmobile: r8a7790: add CAN DT support
In reply to Sergei ShtylyovDefine the generic R8A7790 parts of the CAN0/1 device nodes.
---
Changes in version 2:
- fixed whitespace errors/warnings given by checkpatch.pl;
- added Geert's ACK.
arch/arm/boot/dts/r8a7790.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +20 -0
@@ -792,6 +792,26 @@ }; }; + can0: can at 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 at 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>;
v2 cover Add R8A7790 CAN DT support
In reply to Sergei ShtylyovQuoted 5 lines · Sergei Shtylyov
Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20141231-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 reposted today in order to work.
Simon, now that this patch has been merged, could you merge this patchset too?
Quoted 2 lines
[1/2] ARM: shmobile: r8a7790: add CAN clocks
[2/2] ARM: shmobile: r8a7790: add CAN DT support
WBR, Sergei
v2 cover Add R8A7790 CAN DT support
Quoted 9 lines · Sergei Shtylyov
Quoted 5 lines · Sergei Shtylyov
Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20141231-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 reposted today in order to work.Simon, now that this patch has been merged, could you merge this patchset too?
Sure, I have queued them up as part of renesas-devel-20150219v2-v3.19.
Quoted 10 lines
Quoted 2 lines
[1/2] ARM: shmobile: r8a7790: add CAN clocks
[2/2] ARM: shmobile: r8a7790: add CAN DT supportWBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html