From 3ab84ee95ba4e28b30fd8ec7c38f5e9f72c4b4b7 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 12 Sep 2014 15:15:20 +0200 Subject: [PATCH 01/34] ARM: shmobile: r8a7740 dtsi: Add missing INTCA clock for irqpin module This clock drives the INTCA irqpin controller modules. Before, it was assumed enabled by the bootloader or reset state. Signed-off-by: Geert Uytterhoeven Cc: devicetree@vger.kernel.org Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7740.dtsi | 14 ++++++++++---- include/dt-bindings/clock/r8a7740-clock.h | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index d46c213a17ad..502483f4dccb 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi @@ -71,6 +71,7 @@ 0 149 IRQ_TYPE_LEVEL_HIGH 0 149 IRQ_TYPE_LEVEL_HIGH 0 149 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7740_CLK_INTCA>; }; /* irqpin1: IRQ8 - IRQ15 */ @@ -91,6 +92,7 @@ 0 149 IRQ_TYPE_LEVEL_HIGH 0 149 IRQ_TYPE_LEVEL_HIGH 0 149 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7740_CLK_INTCA>; }; /* irqpin2: IRQ16 - IRQ23 */ @@ -111,6 +113,7 @@ 0 149 IRQ_TYPE_LEVEL_HIGH 0 149 IRQ_TYPE_LEVEL_HIGH 0 149 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7740_CLK_INTCA>; }; /* irqpin3: IRQ24 - IRQ31 */ @@ -131,6 +134,7 @@ 0 149 IRQ_TYPE_LEVEL_HIGH 0 149 IRQ_TYPE_LEVEL_HIGH 0 149 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7740_CLK_INTCA>; }; ether: ethernet@e9a00000 { @@ -448,8 +452,8 @@ mstp2_clks: mstp2_clks@e6150138 { compatible = "renesas,r8a7740-mstp-clocks", "renesas,cpg-mstp-clocks"; reg = <0xe6150138 4>, <0xe6150040 4>; - clocks = <&sub_clk>, <&sub_clk>, - <&cpg_clocks R8A7740_CLK_HP>, + clocks = <&sub_clk>, <&cpg_clocks R8A7740_CLK_HP>, + <&sub_clk>, <&cpg_clocks R8A7740_CLK_HP>, <&cpg_clocks R8A7740_CLK_HP>, <&cpg_clocks R8A7740_CLK_HP>, <&cpg_clocks R8A7740_CLK_HP>, @@ -458,7 +462,8 @@ <&sub_clk>; #clock-cells = <1>; renesas,clock-indices = < - R8A7740_CLK_SCIFA6 R8A7740_CLK_SCIFA7 + R8A7740_CLK_SCIFA6 R8A7740_CLK_INTCA + R8A7740_CLK_SCIFA7 R8A7740_CLK_DMAC1 R8A7740_CLK_DMAC2 R8A7740_CLK_DMAC3 R8A7740_CLK_USBDMAC R8A7740_CLK_SCIFA5 R8A7740_CLK_SCIFB @@ -467,7 +472,8 @@ R8A7740_CLK_SCIFA4 >; clock-output-names = - "scifa6", "scifa7", "dmac1", "dmac2", "dmac3", + "scifa6", "intca", + "scifa7", "dmac1", "dmac2", "dmac3", "usbdmac", "scifa5", "scifb", "scifa0", "scifa1", "scifa2", "scifa3", "scifa4"; }; diff --git a/include/dt-bindings/clock/r8a7740-clock.h b/include/dt-bindings/clock/r8a7740-clock.h index f6b4b0fe7a43..476135da0f23 100644 --- a/include/dt-bindings/clock/r8a7740-clock.h +++ b/include/dt-bindings/clock/r8a7740-clock.h @@ -40,6 +40,7 @@ /* MSTP2 */ #define R8A7740_CLK_SCIFA6 30 +#define R8A7740_CLK_INTCA 29 #define R8A7740_CLK_SCIFA7 22 #define R8A7740_CLK_DMAC1 18 #define R8A7740_CLK_DMAC2 17 From e089f6578ff96243e31ad6257d7c9f4c8a447107 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 27 Sep 2014 01:00:20 +0400 Subject: [PATCH 02/34] ARM: shmobile: r8a7790: add USB PHY DT support Define the R8A7790 generic part of the USB PHY device node. It is up to the board file to enable the device. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index b7c59b7b06b0..12fb3fca2b9f 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -568,6 +568,25 @@ status = "disabled"; }; + usbphy: usb-phy@e6590100 { + compatible = "renesas,usb-phy-r8a7790"; + reg = <0 0xe6590100 0 0x100>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&mstp7_clks R8A7790_CLK_HSUSB>; + clock-names = "usbhs"; + status = "disabled"; + + usb0: usb-channel@0 { + reg = <0>; + #phy-cells = <1>; + }; + usb2: usb-channel@2 { + reg = <2>; + #phy-cells = <1>; + }; + }; + vin0: video@e6ef0000 { compatible = "renesas,vin-r8a7790"; clocks = <&mstp8_clks R8A7790_CLK_VIN0>; From 6742cafb6fe84f00f096b206372b48f14eb56946 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 27 Sep 2014 01:01:35 +0400 Subject: [PATCH 03/34] ARM: shmobile: lager: enable USB PHY Enable USB PHY device for the Lager board. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790-lager.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index acab2e153382..cd530de4336c 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts @@ -472,6 +472,10 @@ pinctrl-names = "default"; }; +&usbphy { + status = "okay"; +}; + /* composite video input */ &vin1 { pinctrl-0 = <&vin1_pins>; From 3b7e530d28db276b596251bbd435a058e27810f1 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 27 Sep 2014 01:08:12 +0400 Subject: [PATCH 04/34] ARM: shmobile: r8a7791: add USB PHY DT support Define the R8A7791 generic part of the USB PHY device node. It is up to the board file to enable the device. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index e4a7170f368b..49f6b9925a89 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -613,6 +613,25 @@ status = "disabled"; }; + usbphy: usb-phy@e6590100 { + compatible = "renesas,usb-phy-r8a7791"; + reg = <0 0xe6590100 0 0x100>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&mstp7_clks R8A7791_CLK_HSUSB>; + clock-names = "usbhs"; + status = "disabled"; + + usb0: usb-channel@0 { + reg = <0>; + #phy-cells = <1>; + }; + usb2: usb-channel@2 { + reg = <2>; + #phy-cells = <1>; + }; + }; + vin0: video@e6ef0000 { compatible = "renesas,vin-r8a7791"; clocks = <&mstp8_clks R8A7791_CLK_VIN0>; From dc80d8bcac7c2eb0421b19cb7c2e297fbaf76da7 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 27 Sep 2014 01:09:22 +0400 Subject: [PATCH 05/34] ARM: shmobile: koelsch: enable USB PHY Enable USB PHY device for the Koelsch board. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index 5e4d833ae491..0402c498b05b 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -474,6 +474,10 @@ pinctrl-names = "default"; }; +&usbphy { + status = "okay"; +}; + &pcie_bus_clk { status = "okay"; }; From fa03f6b243cb29698fe6a2687ac1d8fa9d4da2b8 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 27 Sep 2014 01:10:46 +0400 Subject: [PATCH 06/34] ARM: shmobile: henninger: enable USB PHY Enable USB PHY device for the Henninger board. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-henninger.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts index 0868899882e3..ef2cb9217aef 100644 --- a/arch/arm/boot/dts/r8a7791-henninger.dts +++ b/arch/arm/boot/dts/r8a7791-henninger.dts @@ -272,6 +272,10 @@ pinctrl-names = "default"; }; +&usbphy { + status = "okay"; +}; + &pcie_bus_clk { status = "okay"; }; From 538c40e52df32285aa9440995c7345ea1c4d83b4 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Mon, 29 Sep 2014 22:21:59 +0400 Subject: [PATCH 07/34] ARM: shmobile: r8a7790: link PCI USB devices to USB PHY Describe the PCI USB devices that are behind the PCI bridges, adding necessary links to the USB PHY device. Based on the original work by Ben Dooks . Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 12fb3fca2b9f..7b42b256fe59 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -1197,6 +1197,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>; + + usb@0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usb0 0>; + phy-names = "usb"; + }; + + usb@0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usb0 0>; + phy-names = "usb"; + }; }; pci1: pci@ee0b0000 { @@ -1237,6 +1251,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>; + + usb@0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usb2 0>; + phy-names = "usb"; + }; + + usb@0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usb2 0>; + phy-names = "usb"; + }; }; pciec: pcie@fe000000 { From e1bce1249d15b27c56790ab0ecea4a49dcd0e081 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Mon, 29 Sep 2014 22:23:11 +0400 Subject: [PATCH 08/34] ARM: shmobile: r8a7791: link PCI USB devices to USB PHY Describe the PCI USB devices that are behind the PCI bridges, adding necessary links to the USB PHY device. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 49f6b9925a89..1c58ce0a488a 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -1194,6 +1194,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>; + + usb@0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usb0 0>; + phy-names = "usb"; + }; + + usb@0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usb0 0>; + phy-names = "usb"; + }; }; pci1: pci@ee0d0000 { @@ -1214,6 +1228,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>; + + usb@0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usb2 0>; + phy-names = "usb"; + }; + + usb@0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usb2 0>; + phy-names = "usb"; + }; }; pciec: pcie@fe000000 { From 7c05589413fa9902f2843e91845d6084f6f8e2cd Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Tue, 16 Sep 2014 18:10:37 +0200 Subject: [PATCH 09/34] ARM: shmobile: r8a7790: switch from scif to scifa SCIF and SCIFA can be plexed onto the same wires on Lager board. The datasheet also describes the wires as SCIFA. So, to make use of the bigger FIFOs switch to SCIFA instead. Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790-lager.dts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index cd530de4336c..e96f95216437 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts @@ -19,8 +19,8 @@ compatible = "renesas,lager", "renesas,r8a7790"; aliases { - serial6 = &scif0; - serial7 = &scif1; + serial6 = &scifa0; + serial7 = &scifa1; }; chosen { @@ -207,9 +207,9 @@ renesas,function = "du"; }; - scif0_pins: serial0 { - renesas,groups = "scif0_data"; - renesas,function = "scif0"; + scifa0_pins: serial0 { + renesas,groups = "scifa0_data"; + renesas,function = "scifa0"; }; ether_pins: ether { @@ -222,9 +222,9 @@ renesas,function = "intc"; }; - scif1_pins: serial1 { - renesas,groups = "scif1_data"; - renesas,function = "scif1"; + scifa1_pins: serial1 { + renesas,groups = "scifa1_data"; + renesas,function = "scifa1"; }; sdhi0_pins: sd0 { @@ -356,15 +356,15 @@ }; }; -&scif0 { - pinctrl-0 = <&scif0_pins>; +&scifa0 { + pinctrl-0 = <&scifa0_pins>; pinctrl-names = "default"; status = "okay"; }; -&scif1 { - pinctrl-0 = <&scif1_pins>; +&scifa1 { + pinctrl-0 = <&scifa1_pins>; pinctrl-names = "default"; status = "okay"; From b345aee4d7c2387f2e36cdeb64e0f4dce34598f3 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Thu, 2 Oct 2014 20:42:29 +0200 Subject: [PATCH 10/34] ARM: shmobile: r8a7740 dtsi: Fix clock index for scifa2 The clocks property for the scifa2 device node referred to the scifa0 clock index instead of the scifa2 clock index. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7740.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index 502483f4dccb..559bd39e778b 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi @@ -197,7 +197,7 @@ compatible = "renesas,scifa-r8a7740", "renesas,scifa"; reg = <0xe6c60000 0x100>; interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&mstp2_clks R8A7740_CLK_SCIFA0>; + clocks = <&mstp2_clks R8A7740_CLK_SCIFA2>; clock-names = "sci_ick"; status = "disabled"; }; From 2284ff5f3f7d58e33812f4387c2ac8a09428e4cf Mon Sep 17 00:00:00 2001 From: Kouei Abe Date: Tue, 14 Oct 2014 16:01:40 +0900 Subject: [PATCH 11/34] ARM: shmobile: r8a7790: Add RGX clock to device tree Signed-off-by: Kouei Abe Signed-off-by: Yoshihiro Kaneko Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790.dtsi | 9 +++++---- include/dt-bindings/clock/r8a7790-clock.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 7b42b256fe59..602a46ab985d 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -977,18 +977,19 @@ mstp1_clks: mstp1_clks@e6150134 { compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks"; reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>; - clocks = <&m2_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>, + clocks = <&m2_clk>, <&p_clk>, <&zg_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>, <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>; #clock-cells = <1>; renesas,clock-indices = < - R8A7790_CLK_JPU R8A7790_CLK_TMU1 R8A7790_CLK_TMU3 R8A7790_CLK_TMU2 + R8A7790_CLK_JPU R8A7790_CLK_TMU1 R8A7790_CLK_3DG + R8A7790_CLK_TMU3 R8A7790_CLK_TMU2 R8A7790_CLK_CMT0 R8A7790_CLK_TMU0 R8A7790_CLK_VSP1_DU1 R8A7790_CLK_VSP1_DU0 R8A7790_CLK_VSP1_R R8A7790_CLK_VSP1_S >; clock-output-names = - "jpu", "tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1", - "vsp1-du0", "vsp1-rt", "vsp1-sy"; + "jpu", "tmu1", "3dg", "tmu3", "tmu2", "cmt0", "tmu0", + "vsp1-du1", "vsp1-du0", "vsp1-rt", "vsp1-sy"; }; mstp2_clks: mstp2_clks@e6150138 { compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks"; diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h index 8ea7ab0346ad..14a3f12d13cd 100644 --- a/include/dt-bindings/clock/r8a7790-clock.h +++ b/include/dt-bindings/clock/r8a7790-clock.h @@ -28,6 +28,7 @@ /* MSTP1 */ #define R8A7790_CLK_JPU 6 #define R8A7790_CLK_TMU1 11 +#define R8A7790_CLK_3DG 12 #define R8A7790_CLK_TMU3 21 #define R8A7790_CLK_TMU2 22 #define R8A7790_CLK_CMT0 24 From e4d2fd9eb43d12e9b6a7ab842bf6986b4dd75a1d Mon Sep 17 00:00:00 2001 From: Kouei Abe Date: Tue, 14 Oct 2014 16:01:41 +0900 Subject: [PATCH 12/34] ARM: shmobile: r8a7791: Add SGX clock to device tree Signed-off-by: Kouei Abe Signed-off-by: Yoshihiro Kaneko Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791.dtsi | 11 ++++++----- include/dt-bindings/clock/r8a7791-clock.h | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 1c58ce0a488a..98c1b8bef61f 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -1,7 +1,7 @@ /* * Device Tree Source for the r8a7791 SoC * - * Copyright (C) 2013 Renesas Electronics Corporation + * Copyright (C) 2013-2014 Renesas Electronics Corporation * Copyright (C) 2013-2014 Renesas Solutions Corp. * Copyright (C) 2014 Cogent Embedded Inc. * @@ -977,17 +977,18 @@ mstp1_clks: mstp1_clks@e6150134 { compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>; - clocks = <&m2_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>, + clocks = <&m2_clk>, <&p_clk>, <&zg_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>, <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>; #clock-cells = <1>; renesas,clock-indices = < - R8A7791_CLK_JPU R8A7791_CLK_TMU1 R8A7791_CLK_TMU3 R8A7791_CLK_TMU2 + R8A7791_CLK_JPU R8A7791_CLK_TMU1 R8A7791_CLK_3DG + R8A7791_CLK_TMU3 R8A7791_CLK_TMU2 R8A7791_CLK_CMT0 R8A7791_CLK_TMU0 R8A7791_CLK_VSP1_DU1 R8A7791_CLK_VSP1_DU0 R8A7791_CLK_VSP1_S >; clock-output-names = - "jpu", "tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1", - "vsp1-du0", "vsp1-sy"; + "jpu", "tmu1", "3dg", "tmu3", "tmu2", "cmt0", "tmu0", + "vsp1-du1", "vsp1-du0", "vsp1-sy"; }; mstp2_clks: mstp2_clks@e6150138 { compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h index 58c3f49d068c..9570b7c2eedc 100644 --- a/include/dt-bindings/clock/r8a7791-clock.h +++ b/include/dt-bindings/clock/r8a7791-clock.h @@ -27,6 +27,7 @@ /* MSTP1 */ #define R8A7791_CLK_JPU 6 #define R8A7791_CLK_TMU1 11 +#define R8A7791_CLK_3DG 12 #define R8A7791_CLK_TMU3 21 #define R8A7791_CLK_TMU2 22 #define R8A7791_CLK_CMT0 24 From 4ba8f2468ce346642b4ace3cdf4bdd8d29175011 Mon Sep 17 00:00:00 2001 From: Yoshifumi Hosoya Date: Tue, 14 Oct 2014 16:01:42 +0900 Subject: [PATCH 13/34] ARM: shmobile: r8a7790: Add MMP clock to device tree Signed-off-by: Yoshifumi Hosoya Signed-off-by: Yoshihiro Kaneko Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790.dtsi | 22 ++++++++++++++-------- include/dt-bindings/clock/r8a7790-clock.h | 11 ++++++++++- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 602a46ab985d..050e60890d7f 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -977,18 +977,24 @@ mstp1_clks: mstp1_clks@e6150134 { compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks"; reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>; - clocks = <&m2_clk>, <&p_clk>, <&zg_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>, - <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>, - <&zs_clk>; + clocks = <&zs_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>, <&m2_clk>, + <&zs_clk>, <&p_clk>, <&zg_clk>, <&zs_clk>, <&zs_clk>, + <&zs_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>, + <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>; #clock-cells = <1>; renesas,clock-indices = < - R8A7790_CLK_JPU R8A7790_CLK_TMU1 R8A7790_CLK_3DG - R8A7790_CLK_TMU3 R8A7790_CLK_TMU2 - R8A7790_CLK_CMT0 R8A7790_CLK_TMU0 R8A7790_CLK_VSP1_DU1 - R8A7790_CLK_VSP1_DU0 R8A7790_CLK_VSP1_R R8A7790_CLK_VSP1_S + R8A7790_CLK_VCP1 R8A7790_CLK_VCP0 R8A7790_CLK_VPC1 + R8A7790_CLK_VPC0 R8A7790_CLK_JPU R8A7790_CLK_SSP1 + R8A7790_CLK_TMU1 R8A7790_CLK_3DG R8A7790_CLK_2DDMAC + R8A7790_CLK_FDP1_2 R8A7790_CLK_FDP1_1 R8A7790_CLK_FDP1_0 + R8A7790_CLK_TMU3 R8A7790_CLK_TMU2 R8A7790_CLK_CMT0 + R8A7790_CLK_TMU0 R8A7790_CLK_VSP1_DU1 R8A7790_CLK_VSP1_DU0 + R8A7790_CLK_VSP1_R R8A7790_CLK_VSP1_S >; clock-output-names = - "jpu", "tmu1", "3dg", "tmu3", "tmu2", "cmt0", "tmu0", + "vcp1", "vcp0", "vpc1", "vpc0", "jpu", "ssp1", + "tmu1", "3dg", "2ddmac", "fdp1-2", "fdp1-1", + "fdp1-0", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1", "vsp1-du0", "vsp1-rt", "vsp1-sy"; }; mstp2_clks: mstp2_clks@e6150138 { diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h index 14a3f12d13cd..e3a3fb80feb6 100644 --- a/include/dt-bindings/clock/r8a7790-clock.h +++ b/include/dt-bindings/clock/r8a7790-clock.h @@ -26,9 +26,18 @@ #define R8A7790_CLK_MSIOF0 0 /* MSTP1 */ -#define R8A7790_CLK_JPU 6 +#define R8A7790_CLK_VCP1 0 +#define R8A7790_CLK_VCP0 1 +#define R8A7790_CLK_VPC1 2 +#define R8A7790_CLK_VPC0 3 +#define R8A7790_CLK_JPU 6 +#define R8A7790_CLK_SSP1 9 #define R8A7790_CLK_TMU1 11 #define R8A7790_CLK_3DG 12 +#define R8A7790_CLK_2DDMAC 15 +#define R8A7790_CLK_FDP1_2 17 +#define R8A7790_CLK_FDP1_1 18 +#define R8A7790_CLK_FDP1_0 19 #define R8A7790_CLK_TMU3 21 #define R8A7790_CLK_TMU2 22 #define R8A7790_CLK_CMT0 24 From 74d89d25f6b0d84f7cd2fc09dc708177787c1465 Mon Sep 17 00:00:00 2001 From: Yoshifumi Hosoya Date: Tue, 14 Oct 2014 16:01:43 +0900 Subject: [PATCH 14/34] ARM: shmobile: r8a7791: Add MMP clock to device tree Signed-off-by: Yoshifumi Hosoya Signed-off-by: Yoshihiro Kaneko Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791.dtsi | 21 +++++++++++++-------- include/dt-bindings/clock/r8a7791-clock.h | 8 +++++++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 98c1b8bef61f..6ce78193985d 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -977,18 +977,23 @@ mstp1_clks: mstp1_clks@e6150134 { compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>; - clocks = <&m2_clk>, <&p_clk>, <&zg_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>, - <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>; + clocks = <&zs_clk>, <&zs_clk>, <&m2_clk>, <&zs_clk>, <&p_clk>, + <&zg_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>, <&p_clk>, + <&p_clk>, <&rclk_clk>, <&cp_clk>, <&zs_clk>, <&zs_clk>, + <&zs_clk>; #clock-cells = <1>; renesas,clock-indices = < - R8A7791_CLK_JPU R8A7791_CLK_TMU1 R8A7791_CLK_3DG - R8A7791_CLK_TMU3 R8A7791_CLK_TMU2 - R8A7791_CLK_CMT0 R8A7791_CLK_TMU0 R8A7791_CLK_VSP1_DU1 - R8A7791_CLK_VSP1_DU0 R8A7791_CLK_VSP1_S + R8A7791_CLK_VCP0 R8A7791_CLK_VPC0 R8A7791_CLK_JPU + R8A7791_CLK_SSP1 R8A7791_CLK_TMU1 R8A7791_CLK_3DG + R8A7791_CLK_2DDMAC R8A7791_CLK_FDP1_1 R8A7791_CLK_FDP1_0 + R8A7791_CLK_TMU3 R8A7791_CLK_TMU2 R8A7791_CLK_CMT0 + R8A7791_CLK_TMU0 R8A7791_CLK_VSP1_DU1 R8A7791_CLK_VSP1_DU0 + R8A7791_CLK_VSP1_S >; clock-output-names = - "jpu", "tmu1", "3dg", "tmu3", "tmu2", "cmt0", "tmu0", - "vsp1-du1", "vsp1-du0", "vsp1-sy"; + "vcp0", "vpc0", "jpu", "ssp1", "tmu1", "3dg", + "2ddmac", "fdp1-1", "fdp1-0", "tmu3", "tmu2", "cmt0", + "tmu0", "vsp1-du1", "vsp1-du0", "vsp1-sy"; }; mstp2_clks: mstp2_clks@e6150138 { compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h index 9570b7c2eedc..dcececd9f4d0 100644 --- a/include/dt-bindings/clock/r8a7791-clock.h +++ b/include/dt-bindings/clock/r8a7791-clock.h @@ -25,9 +25,15 @@ #define R8A7791_CLK_MSIOF0 0 /* MSTP1 */ -#define R8A7791_CLK_JPU 6 +#define R8A7791_CLK_VCP0 1 +#define R8A7791_CLK_VPC0 3 +#define R8A7791_CLK_JPU 6 +#define R8A7791_CLK_SSP1 9 #define R8A7791_CLK_TMU1 11 #define R8A7791_CLK_3DG 12 +#define R8A7791_CLK_2DDMAC 15 +#define R8A7791_CLK_FDP1_1 18 +#define R8A7791_CLK_FDP1_0 19 #define R8A7791_CLK_TMU3 21 #define R8A7791_CLK_TMU2 22 #define R8A7791_CLK_CMT0 24 From 600363334de89169a8dbbb1db874777d46fc239e Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 22 Oct 2014 11:38:28 +0200 Subject: [PATCH 15/34] ARM: shmobile: r8a7740 dtsi: Add TMU0 and TMU1 device nodes Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7740.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index 559bd39e778b..aec8da89ef9a 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi @@ -335,6 +335,34 @@ status = "disabled"; }; + tmu0: timer@fff80000 { + compatible = "renesas,tmu-r8a7740", "renesas,tmu"; + reg = <0xfff80000 0x2c>; + interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>, + <0 199 IRQ_TYPE_LEVEL_HIGH>, + <0 200 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp1_clks R8A7740_CLK_TMU0>; + clock-names = "fck"; + + #renesas,channels = <3>; + + status = "disabled"; + }; + + tmu1: timer@fff90000 { + compatible = "renesas,tmu-r8a7740", "renesas,tmu"; + reg = <0xfff90000 0x2c>; + interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>, + <0 171 IRQ_TYPE_LEVEL_HIGH>, + <0 172 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp1_clks R8A7740_CLK_TMU1>; + clock-names = "fck"; + + #renesas,channels = <3>; + + status = "disabled"; + }; + clocks { #address-cells = <1>; #size-cells = <1>; From df211020718a7cbad0a8018c924ba7dd002f7282 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 22 Oct 2014 11:38:29 +0200 Subject: [PATCH 16/34] ARM: shmobile: armadillo800eva dts: Enable TMU0 ch0 will be used for clock events and for periodic clock events, ch1 will be used as clock source. Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts index 2703428557fc..98504e0b06c8 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts @@ -299,3 +299,7 @@ status = "okay"; }; + +&tmu0 { + status = "okay"; +}; From 2109b5a28d27a593ab5afa7179fbef2f6a7cabcd Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 7 Jul 2014 09:54:30 +0200 Subject: [PATCH 17/34] ARM: shmobile: r8a7778: Add TMU nodes This describes all of the TMU hardware of the r8a7778. Each node is disabled and may be enabled as necessary by board DTS files. Acked-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7778.dtsi | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi index 315ec62cb96b..1e80e4c69482 100644 --- a/arch/arm/boot/dts/r8a7778.dtsi +++ b/arch/arm/boot/dts/r8a7778.dtsi @@ -162,6 +162,42 @@ status = "disabled"; }; + tmu0: timer@ffd80000 { + compatible = "renesas,tmu"; + reg = <0xffd80000 0x30>; + interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>, + <0 33 IRQ_TYPE_LEVEL_HIGH>, + <0 34 IRQ_TYPE_LEVEL_HIGH>; + + #renesas,channels = <3>; + + status = "disabled"; + }; + + tmu1: timer@ffd81000 { + compatible = "renesas,tmu"; + reg = <0xffd81000 0x30>; + interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>, + <0 37 IRQ_TYPE_LEVEL_HIGH>, + <0 38 IRQ_TYPE_LEVEL_HIGH>; + + #renesas,channels = <3>; + + status = "disabled"; + }; + + tmu2: timer@ffd82000 { + compatible = "renesas,tmu"; + reg = <0xffd82000 0x30>; + interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>, + <0 41 IRQ_TYPE_LEVEL_HIGH>, + <0 42 IRQ_TYPE_LEVEL_HIGH>; + + #renesas,channels = <3>; + + status = "disabled"; + }; + scif0: serial@ffe40000 { compatible = "renesas,scif-r8a7778", "renesas,scif"; reg = <0xffe40000 0x100>; From 18b27aeb5591588de35628bf1e423abf24fe9695 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 7 Jul 2014 09:54:31 +0200 Subject: [PATCH 18/34] ARM: shmobile: bockw-reference: Initialise TMU device using DT Initialise TMU device using DT when booting bockw using DT-reference. Acked-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7778-bockw-reference.dts | 4 ++++ arch/arm/mach-shmobile/setup-r8a7778.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts index fba294905ff4..04c0c37bb784 100644 --- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts +++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts @@ -74,6 +74,10 @@ status = "okay"; }; +&tmu0 { + status = "okay"; +}; + &pfc { scif0_pins: serial0 { renesas,groups = "scif0_data_a", "scif0_ctrl"; diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 8ec784fc6b26..7c7223de1e9c 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -288,8 +288,6 @@ void __init r8a7778_add_dt_devices(void) l2x0_init(base, 0x00400000, 0xc20f0fff); } #endif - - r8a7778_register_tmu(0); } /* HPB-DMA */ @@ -497,6 +495,7 @@ static void __init r8a7778_register_hpb_dmae(void) void __init r8a7778_add_standard_devices(void) { r8a7778_add_dt_devices(); + r8a7778_register_tmu(0); r8a7778_register_scif(0); r8a7778_register_scif(1); r8a7778_register_scif(2); From da33648c4296a8590fbeafd7c1ae4494dfe8b04c Mon Sep 17 00:00:00 2001 From: Hisashi Nakamura Date: Fri, 12 Sep 2014 10:52:06 +0200 Subject: [PATCH 19/34] ARM: shmobile: r8a7794: Add arch_timer to device tree Signed-off-by: Hisashi Nakamura Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7794.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi index d4e8bce1e0b7..088e79c6551c 100644 --- a/arch/arm/boot/dts/r8a7794.dtsi +++ b/arch/arm/boot/dts/r8a7794.dtsi @@ -82,6 +82,14 @@ status = "disabled"; }; + timer { + compatible = "arm,armv7-timer"; + interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <1 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <1 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + }; + irqc0: interrupt-controller@e61c0000 { compatible = "renesas,irqc-r8a7794", "renesas,irqc"; #interrupt-cells = <2>; From 157fcd8a3e6fb46ad99b615838afe16e8fcebd61 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Fri, 24 Oct 2014 19:41:46 +0900 Subject: [PATCH 20/34] ARM: shmobile: r8a7790: add USB3.0 device node Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 050e60890d7f..ad5df808900c 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -1186,6 +1186,16 @@ status = "disabled"; }; + xhci: usb@ee000000 { + compatible = "renesas,xhci-r8a7790"; + reg = <0 0xee000000 0 0xc00>; + interrupts = <0 101 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7790_CLK_SSUSB>; + phys = <&usb2 1>; + phy-names = "usb"; + status = "disabled"; + }; + pci0: pci@ee090000 { compatible = "renesas,pci-r8a7790"; device_type = "pci"; From 37f7c1b0c1ed9465b2e2609ba57bba8a874ddd3c Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Fri, 24 Oct 2014 19:41:47 +0900 Subject: [PATCH 21/34] ARM: shmobile: lager: enable USB3.0 Since the PHY of USB3.0 and EHCI/OHCI ch2 are the same, the USB3.0 driver cannot use the phy driver when the EHCI/OHCI ch2 already used it: phy phy-e6590100.usb-phy.3: phy init failed --> -16 xhci-hcd: probe of ee000000.usb failed with error -16 If so, we have to unbind the EHCI/OHCI ch2, and then we have to bind the USB3.0 driver as the following: echo 0000:02:02.0 > /sys/bus/pci/drivers/ehci-pci/unbind echo 0000:02:01.0 > /sys/bus/pci/drivers/ohci-pci/unbind echo ee000000.usb > /sys/bus/platform/drivers/xhci-hcd/bind Note that there will be pinctrl-related error messages if both internal PCI and USB3.0 are enabled but they should be just ignored: sh-pfc e6060000.pfc: pin GP_5_22 already requested by ee0d0000.pci; cannot claim for ee000000.usb sh-pfc e6060000.pfc: pin-182 (ee000000.usb) status -22 ata1: SATA link down (SStatus 0 SControl 300) sh-pfc e6060000.pfc: could not request pin 182 (GP_5_22) from group usb2 on device sh-pfc Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790-lager.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index e96f95216437..d869f2a6826a 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts @@ -466,6 +466,12 @@ pinctrl-names = "default"; }; +&xhci { + status = "okay"; + pinctrl-0 = <&usb2_pins>; + pinctrl-names = "default"; +}; + &pci2 { status = "okay"; pinctrl-0 = <&usb2_pins>; From c196931ece017a0aeeef4ee6d4fbb5adeb7dfd0a Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Fri, 24 Oct 2014 19:43:02 +0900 Subject: [PATCH 22/34] ARM: shmobile: r8a7791: add USB3.0 device node Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 6ce78193985d..d55335edbb23 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -1182,6 +1182,16 @@ status = "disabled"; }; + xhci: usb@ee000000 { + compatible = "renesas,xhci-r8a7791"; + reg = <0 0xee000000 0 0xc00>; + interrupts = <0 101 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7791_CLK_SSUSB>; + phys = <&usb2 1>; + phy-names = "usb"; + status = "disabled"; + }; + pci0: pci@ee090000 { compatible = "renesas,pci-r8a7791"; device_type = "pci"; From ae0a555b68ae4feef07e919b22ef2e0b792616ee Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Fri, 24 Oct 2014 19:44:33 +0900 Subject: [PATCH 23/34] ARM: shmobile: r8a7790: add HS-USB device node Define the R8A7790 generic part of the HS-USB device node. It is up to the board file to enable the device. Signed-off-by: Yoshihiro Shimoda [Sergei: fixed summary, added changelog] Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index ad5df808900c..a2f2c7f71b68 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -568,6 +568,17 @@ status = "disabled"; }; + hsusb: usb@e6590000 { + compatible = "renesas,usbhs-r8a7790"; + reg = <0 0xe6590000 0 0x100>; + interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp7_clks R8A7790_CLK_HSUSB>; + renesas,buswait = <4>; + phys = <&usb0 1>; + phy-names = "usb"; + status = "disabled"; + }; + usbphy: usb-phy@e6590100 { compatible = "renesas,usb-phy-r8a7790"; reg = <0 0xe6590100 0 0x100>; From e03074a7b5fdd2834a9fbbe77bc52a1ddb0d017f Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Fri, 24 Oct 2014 19:44:34 +0900 Subject: [PATCH 24/34] ARM: shmobile: lager: enable HS-USB Enable HS-USB device for the Lager board, defining the GPIO that the driver should check when probing. Since this board doesn't have the OTG ID pin, we assume that GP5_18 (USB0_PWEN) is an ID pin because it is 1 when the SW5 is in position 2-3 (meaning USB function) and 0 in other positions. Note that there will be pinctrl-related error messages if both internal PCI and HS-USB drivers are enabled but they should be just ignored. Signed-off-by: Yoshihiro Shimoda [Sergei: added pin node and prop, moved device node, fixed summary, supplemented changelog] Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790-lager.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index d869f2a6826a..830f2e87df49 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts @@ -268,6 +268,11 @@ renesas,function = "iic3"; }; + hsusb_pins: hsusb { + renesas,groups = "usb0_ovc_vbus"; + renesas,function = "usb0"; + }; + usb0_pins: usb0 { renesas,groups = "usb0"; renesas,function = "usb0"; @@ -478,6 +483,13 @@ pinctrl-names = "default"; }; +&hsusb { + status = "okay"; + pinctrl-0 = <&hsusb_pins>; + pinctrl-names = "default"; + renesas,enable-gpio = <&gpio5 18 GPIO_ACTIVE_HIGH>; +}; + &usbphy { status = "okay"; }; From 1c1fee7cbba99023a11d4d2991b56c99a3174bd4 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Fri, 24 Oct 2014 19:45:06 +0900 Subject: [PATCH 25/34] ARM: shmobile: r8a7791: add HS-USB device node Define the R8A7791 generic part of the HS-USB device node. It is up to the board file to enable the device. Signed-off-by: Yoshihiro Shimoda [Sergei: fixed summary, added changelog] Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index d55335edbb23..c81531314414 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -613,6 +613,17 @@ status = "disabled"; }; + hsusb: usb@e6590000 { + compatible = "renesas,usbhs-r8a7791"; + reg = <0 0xe6590000 0 0x100>; + interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp7_clks R8A7791_CLK_HSUSB>; + renesas,buswait = <4>; + phys = <&usb0 1>; + phy-names = "usb"; + status = "disabled"; + }; + usbphy: usb-phy@e6590100 { compatible = "renesas,usb-phy-r8a7791"; reg = <0 0xe6590100 0 0x100>; From fc4a00b78c7f8a770b9608164c0c9cdd0e4e68c2 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Fri, 24 Oct 2014 19:45:07 +0900 Subject: [PATCH 26/34] ARM: shmobile: koelsch: enable HS-USB Enable HS-USB device for the Koelsch board, defining the GPIO that the driver should check when probing (which is the ID output from MAX3355 OTG chip). Note that there will be pinctrl-related error messages if both internal PCI and HS-USB drivers are enabled but they should be just ignored. Signed-off-by: Yoshihiro Shimoda [Sergei: added pin function/group and prop, moved device node, fixed summary, added changelog] Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index 0402c498b05b..191f32bc43ea 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -474,6 +474,13 @@ pinctrl-names = "default"; }; +&hsusb { + status = "okay"; + pinctrl-0 = <&usb0_pins>; + pinctrl-names = "default"; + renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>; +}; + &usbphy { status = "okay"; }; From 6f4f7156e0e6b215fad118abf4830177528ef7ad Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Fri, 24 Oct 2014 19:45:08 +0900 Subject: [PATCH 27/34] ARM: shmobile: henninger: enable HS-USB Enable HS-USB device for the Henninger board, defining the GPIO that the driver should check when probing (which is the ID output from MAX3355 OTG chip). Note that there will be pinctrl-related error messages if both internal PCI and HS-USB drivers are enabled but they should be just ignored. Signed-off-by: Yoshihiro Shimoda [Sergei: added pin function/group and prop, moved device node, fixed summary, added changelog] Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-henninger.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts index ef2cb9217aef..740e38678032 100644 --- a/arch/arm/boot/dts/r8a7791-henninger.dts +++ b/arch/arm/boot/dts/r8a7791-henninger.dts @@ -272,6 +272,13 @@ pinctrl-names = "default"; }; +&hsusb { + status = "okay"; + pinctrl-0 = <&usb0_pins>; + pinctrl-names = "default"; + renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>; +}; + &usbphy { status = "okay"; }; From 2cd823fc01d61e09f50d64624ec53da090ced742 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 24 Oct 2014 13:36:02 +0200 Subject: [PATCH 28/34] ARM: shmobile: r8a73a4: Add SoC-specific CMT compatible property The CMT1 timer used the generic compatible property only. Add the SoC-specific one, which is already documented, to make it future proof. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a73a4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi index 80939671b034..b5ead845c6c3 100644 --- a/arch/arm/boot/dts/r8a73a4.dtsi +++ b/arch/arm/boot/dts/r8a73a4.dtsi @@ -114,7 +114,7 @@ }; cmt1: timer@e6130000 { - compatible = "renesas,cmt-48-gen2"; + compatible = "renesas,cmt-48-r8a73a4", "renesas,cmt-48-gen2"; reg = <0 0xe6130000 0 0x1004>; interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>; From 45b439c1aae45d344c55864f81d52ef90ce4d8f8 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 24 Oct 2014 13:36:03 +0200 Subject: [PATCH 29/34] ARM: shmobile: r8a7778: Add SoC-specific TMU compatible property The TMU timers used the generic compatible property only. Add the SoC-specific one, to make it future proof. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7778.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi index 1e80e4c69482..96297f67fda8 100644 --- a/arch/arm/boot/dts/r8a7778.dtsi +++ b/arch/arm/boot/dts/r8a7778.dtsi @@ -163,7 +163,7 @@ }; tmu0: timer@ffd80000 { - compatible = "renesas,tmu"; + compatible = "renesas,tmu-r8a7778", "renesas,tmu"; reg = <0xffd80000 0x30>; interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>, <0 33 IRQ_TYPE_LEVEL_HIGH>, @@ -175,7 +175,7 @@ }; tmu1: timer@ffd81000 { - compatible = "renesas,tmu"; + compatible = "renesas,tmu-r8a7778", "renesas,tmu"; reg = <0xffd81000 0x30>; interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>, <0 37 IRQ_TYPE_LEVEL_HIGH>, @@ -187,7 +187,7 @@ }; tmu2: timer@ffd82000 { - compatible = "renesas,tmu"; + compatible = "renesas,tmu-r8a7778", "renesas,tmu"; reg = <0xffd82000 0x30>; interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>, <0 41 IRQ_TYPE_LEVEL_HIGH>, From 22c2b78d3131cd161599be7a9f320523969b23c4 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 26 Oct 2014 19:40:11 +0200 Subject: [PATCH 30/34] ARM: shmobile: r8a7790: Rename mmcif node to mmc Node names should describe the function of the device, not its IP core name. Signed-off-by: Laurent Pinchart Tested-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index a2f2c7f71b68..63922a136313 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -392,7 +392,7 @@ status = "disabled"; }; - mmcif0: mmcif@ee200000 { + mmcif0: mmc@ee200000 { compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif"; reg = <0 0xee200000 0 0x80>; interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>; From 8edae499162c30af16f0b8a77d394c19791ae372 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 26 Oct 2014 19:40:12 +0200 Subject: [PATCH 31/34] ARM: shmobile: r8a7791: Add MMCIF0 DT node Add the MMCIF0 device to the r8a7791 device tree. Signed-off-by: Laurent Pinchart Tested-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index c81531314414..8459fe698008 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -400,6 +400,15 @@ #gpio-range-cells = <3>; }; + mmcif0: mmc@ee200000 { + compatible = "renesas,mmcif-r8a7791", "renesas,sh-mmcif"; + reg = <0 0xee200000 0 0x80>; + interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7791_CLK_MMCIF0>; + reg-io-width = <4>; + status = "disabled"; + }; + sdhi0: sd@ee100000 { compatible = "renesas,sdhi-r8a7791"; reg = <0 0xee100000 0 0x200>; From 108216c1e08db6c69a54ba7ee593335eceea2077 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 26 Oct 2014 19:40:13 +0200 Subject: [PATCH 32/34] ARM: shmobile: r8a7790: Reference DMA channels in MMCIF DT nodes Add references to the transmit and receive DMA channels in the two MMCIF nodes. Signed-off-by: Laurent Pinchart Acked-by: Geert Uytterhoeven Tested-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7790.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 63922a136313..52c21569e352 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -397,6 +397,8 @@ reg = <0 0xee200000 0 0x80>; interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>; + dmas = <&dmac0 0xd1>, <&dmac0 0xd2>; + dma-names = "tx", "rx"; reg-io-width = <4>; status = "disabled"; }; @@ -406,6 +408,8 @@ reg = <0 0xee220000 0 0x80>; interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp3_clks R8A7790_CLK_MMCIF1>; + dmas = <&dmac0 0xe1>, <&dmac0 0xe2>; + dma-names = "tx", "rx"; reg-io-width = <4>; status = "disabled"; }; From 16b355b4aa234f4358c288e931e4cdefbbcfc4b0 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 26 Oct 2014 19:40:14 +0200 Subject: [PATCH 33/34] ARM: shmobile: r8a7791: Reference DMA channels in MMCIF DT node Add references to the transmit and receive DMA channels in the MMCIF node. Signed-off-by: Laurent Pinchart Acked-by: Geert Uytterhoeven Tested-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 8459fe698008..a862243f0436 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -405,6 +405,8 @@ reg = <0 0xee200000 0 0x80>; interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp3_clks R8A7791_CLK_MMCIF0>; + dmas = <&dmac0 0xd1>, <&dmac0 0xd2>; + dma-names = "tx", "rx"; reg-io-width = <4>; status = "disabled"; }; From 25af9c83151822eb6d413b4d15d5f89804606ac7 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 29 Oct 2014 14:58:51 +0100 Subject: [PATCH 34/34] ARM: shmobile: r8a7779 dtsi: Add SoC-specific SATA compatible property The SATA node used the generic compatible property only, which was deprecated by commit e67adb4e669db834 ("sata_rcar: Add R-Car Gen2 SATA PHY support"). Add the SoC-specific one introduced by that commit. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7779.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi index fda814ed191d..a8845328827a 100644 --- a/arch/arm/boot/dts/r8a7779.dtsi +++ b/arch/arm/boot/dts/r8a7779.dtsi @@ -303,7 +303,7 @@ }; sata: sata@fc600000 { - compatible = "renesas,rcar-sata"; + compatible = "renesas,sata-r8a7779", "renesas,rcar-sata"; reg = <0xfc600000 0x2000>; interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp1_clks R8A7779_CLK_SATA>;