From patchwork Mon Aug 3 01:53:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6926581 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EDB5FC05AC for ; Mon, 3 Aug 2015 01:53:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB926203C2 for ; Mon, 3 Aug 2015 01:53:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B9ABA203C1 for ; Mon, 3 Aug 2015 01:53:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbbHCBx3 (ORCPT ); Sun, 2 Aug 2015 21:53:29 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:49756 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752139AbbHCBx2 (ORCPT ); Sun, 2 Aug 2015 21:53:28 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie2.idc.renesas.com with ESMTP; 03 Aug 2015 10:53:27 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 673A4431E8; Mon, 3 Aug 2015 10:53:27 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 3BD891806F; Mon, 3 Aug 2015 10:53:26 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id ED75218071; Mon, 3 Aug 2015 10:53:26 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id LAJ11445; Mon, 3 Aug 2015 10:53:26 +0900 X-IronPort-AV: E=Sophos;i="5.15,598,1432566000"; d="scan'";a="191635548" Received: from mail-pu1apc01lp0017.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.17]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 03 Aug 2015 10:53:25 +0900 Authentication-Results: verge.net.au; dkim=none (message not signed) header.d=none; Received: from morimoto-PC.renesas.com (211.11.155.144) by HK2PR06MB0594.apcprd06.prod.outlook.com (10.161.187.145) with Microsoft SMTP Server (TLS) id 15.1.225.19; Mon, 3 Aug 2015 01:53:23 +0000 Message-ID: <873801w377.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/4 v3][RFC] arm64: renesas: Add initial r8a7795 SoC support User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") To: Simon , Magnus CC: , Geert Uytterhoeven In-Reply-To: <877fpdw3av.wl%kuninori.morimoto.gx@renesas.com> References: <877fpdw3av.wl%kuninori.morimoto.gx@renesas.com> Date: Mon, 3 Aug 2015 01:53:23 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0033.jpnprd01.prod.outlook.com (25.165.48.143) To HK2PR06MB0594.apcprd06.prod.outlook.com (25.161.187.145) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0594; 2:f2cH82sJZDhTusbkaWN7hHmuVYJHeAg9HgfMDyJP3OoNQ90cLG+hzveLQETGGtxQ4dve6xKL15/ztPoT6SJACohk+1NrYpSAwavxTr6qrKIdh82mDELmzq9Q5hZpo17/s5XyDdluscUMsE4bd0CHnluqa6HRGiUH/+r1eaQElEo=; 3:C11mZCnPkwPpzUG4bWzxyNXM/QBy2Fj7NZVQwiZYD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oEyfmZ+Xx9djJenb3g7ViwgB9UNUiRn8ZWT8ZdggUrNKP0MOAnyDMmpRwXRiZfUy1ggxsEb6ROhoaMbkfRDXuAvwhlSgojkSMfKVZ0FhLfT+nKyV0ljvlWjuwrPAoAHzEWcmm2Gd66F6mBlosuxwG06HT1xLQbDvojyQEygc+z/msiqFTd1c83Q8kXGp+jEE5lKaVgQKf9LCcEfEd+1G6tSyBDVWauTEI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:HK2PR06MB0594; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB0594; X-Forefront-PRVS: 0657D528EC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(77096005)(2950100001)(86362001)(83506001)(229853001)(92566002)(5001960100002)(54356999)(50986999)(23726002)(76176999)(5001770100001)(189998001)(50466002)(4001350100001)(42186005)(47776003)(19580405001)(19580395003)(66066001)(46102003)(33646002)(46406003)(62966003)(36756003)(77156002)(122386002)(40100003)(53416004); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0594; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0594; 23:sXaON3HZ+f27UtebTKWoV28i9jGPx7e0zq6whagcM/VhbdM8yhuIQ8E/MK3C9ycgZ/ggr7Ze4Q/diWTZGfm7x/tLAMVhYiLnQaQu8zNQaUrbGbnNhpo1eLRAek1heUbzuZRolD1d5QSNJGOCoGc53q8OjplzgOjjTSlJMXXba19yFAlPdOtGEBW9V43WVCj0Mdk0SQgFfy/gVVHST+Z9/Uyyub5WJdgMRx7iwX2Zau0ZJnUdIM6I0Aw/B2ysgU/BlFgKZQ4k153XRjDy1lmQ8aX6A9l7YbD7Q8raXyRkYmM7z4Lf4KIdHFG0sjpzOOoi0fe2JGXI3AS4YnPQ6C8afZaDZlxfNueJuMaIDD1aR3e8osJ5BvhbO2pF2YSPlpECp9QxRHxc2g8VXBQp/TEw4mulkPweoBkqGDcewHZRP7YZ8fSmifkiWFqsh4F7DJYhwN5gCFojXx5UIXX5cjMWLCUWg1JTako065k5qupxj/hSfH/C6V7lll1NuJpfVn0t0ycx7d40UxkuxZgiutc72WbtqO8nQb0EwGvNy41AoLdnsY8ug6R/FKkUAuG7/8o7FXkUQqQbnCiJ4HdTNoRpV+kT7lSriI9HwrNurVVRNl9iZur6JbxlVvaFAVMVcT9Pp8nMhu6oSIfp/GeOXXKpVueFnQA7VwnGXY3BelzeSKjxQIxs6dWsA0Pd28YcQqwdV6NDzwxCHUSmrq59kbbVPnQqXC2NzhHATHiitLRdjTx0BMO+0a04HdDirhxXzfrX5KHWJA6vp+B4pTGus10Ol9+nivzrJUIVJv81JEe1OC1PEYtU6MbAd8EVoJUqmYgqavD4i/84oT5lqbo/1wRIXA== X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0594; 5:23WTrd3KeyoeFi3gfrGgMJ+Nj+NDKllTFNv5Ifi5mP9uvrP2N1rP/u6hPDCxOA5ow9vrqvQGOa1hvhi+gsFdUdywuM6JZaUZFW0p+kt7a1tac+eySRgkUodlAe+yzR4lnKEoqQOHfZWnCz/DVchMgQ==; 24:uOQj6I/QhkSeJ5RTjdHdF36cZMfNHOQv/2iP8dnzPn22l+E2HHi8yRFvKaD9LYn2soWILdMculxZERi2Wsawt7vXGRO15NvcksYt28R4lXo=; 20:W7kM4pWU+kIlVECSBDimiX0IGS0PlSljjIv0bPoqtRvszUqZ3AEb66teluclC1aV7d0MQaLh9+4x4X8APq7H8LC5F7leJ/mrdiA5npGFylGqu7wtDw89Xf1wxZt5Xst28E1AoKTDF5CDue6U56rcVhfO02Klye0qd/recGKRd4I= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2015 01:53:23.4190 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB0594 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gaku Inami Signed-off-by: Gaku Inami Signed-off-by: Kuninori Morimoto --- v2 -> v3 - no change Documentation/devicetree/bindings/arm/shmobile.txt | 2 + .../bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/renesas/Makefile | 5 ++ arch/arm64/boot/dts/renesas/r8a7795.dtsi | 93 ++++++++++++++++++++++ include/dt-bindings/clock/r8a7795-clock.h | 31 ++++++++ 6 files changed, 133 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/Makefile create mode 100644 arch/arm64/boot/dts/renesas/r8a7795.dtsi create mode 100644 include/dt-bindings/clock/r8a7795-clock.h diff --git a/Documentation/devicetree/bindings/arm/shmobile.txt b/Documentation/devicetree/bindings/arm/shmobile.txt index c4f19b2..8d696a0 100644 --- a/Documentation/devicetree/bindings/arm/shmobile.txt +++ b/Documentation/devicetree/bindings/arm/shmobile.txt @@ -27,6 +27,8 @@ SoCs: compatible = "renesas,r8a7793" - R-Car E2 (R8A77940) compatible = "renesas,r8a7794" + - R-Car H3 (R8A77950) + compatible = "renesas,r8a7795" Boards: diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt index 16ed181..4169c76 100644 --- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt @@ -19,6 +19,7 @@ Required Properties: - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2-W) MSTP gate clocks - "renesas,r8a7793-mstp-clocks" for R8A7793 (R-Car M2-N) MSTP gate clocks - "renesas,r8a7794-mstp-clocks" for R8A7794 (R-Car E2) MSTP gate clocks + - "renesas,r8a7795-mstp-clocks" for R8A7795 (R-Car H3) MSTP gate clocks - "renesas,sh73a0-mstp-clocks" for SH73A0 (SH-MobileAG5) MSTP gate clocks and "renesas,cpg-mstp-clocks" as a fallback. - reg: Base address and length of the I/O mapped registers used by the MSTP diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile index 38913be2..5691ca4 100644 --- a/arch/arm64/boot/dts/Makefile +++ b/arch/arm64/boot/dts/Makefile @@ -7,6 +7,7 @@ dts-dirs += freescale dts-dirs += hisilicon dts-dirs += mediatek dts-dirs += qcom +dts-dirs += renesas dts-dirs += sprd dts-dirs += xilinx diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile new file mode 100644 index 0000000..6aeefd9 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/Makefile @@ -0,0 +1,5 @@ +dtb-$(CONFIG_ARCH_RCAR_GEN3) += + +always := $(dtb-y) +subdir-y := $(dts-dirs) +clean-files := *.dtb diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi new file mode 100644 index 0000000..0f298c3 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi @@ -0,0 +1,93 @@ +/* + * Device Tree Source for the r8a7795 SoC + * + * Copyright (C) 2015 Renesas Electronics Corp. + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +#include +#include + +/ { + compatible = "renesas,r8a7795"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + /* 1core only at this point */ + a57_0: cpu@0 { + compatible = "arm,cortex-a57", "arm,armv8"; + reg = <0x0>; + device_type = "cpu"; + }; + }; + + gic: interrupt-controller@0xf1010000 { + compatible = "arm,gic-400"; + #interrupt-cells = <3>; + #address-cells = <0>; + interrupt-controller; + reg = <0x0 0xf1010000 0 0x1000>, + <0x0 0xf1020000 0 0x2000>; + interrupts = ; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = , + , + , + ; + }; + + clocks { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + extal_clk: extal_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + clock-output-names = "extal"; + }; + cpg_clocks: cpg_clocks@e6150000 { + compatible = "renesas,r8a7795-cpg-clocks", + "renesas,rcar-gen3-cpg-clocks"; + reg = <0 0xe6150000 0 0x1000>; + clocks = <&extal_clk>; + #clock-cells = <1>; + clock-output-names = "main", "pll0", "pll1","pll2", + "pll3", "pll4"; + }; + p_clk: p_clk { + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks RCAR_GEN3_CLK_PLL1>; + #clock-cells = <0>; + clock-div = <24>; + clock-mult = <1>; + clock-output-names = "p"; + }; + mstp3_clks: mstp3_clks@e615013c { + compatible = "renesas,r8a7795-mstp-clocks", + "renesas,cpg-mstp-clocks"; + reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>; + clocks = <&p_clk>; + #clock-cells = <1>; + renesas,clock-indices = ; + clock-output-names = "irda"; + }; + }; +}; diff --git a/include/dt-bindings/clock/r8a7795-clock.h b/include/dt-bindings/clock/r8a7795-clock.h new file mode 100644 index 0000000..fc1c4da --- /dev/null +++ b/include/dt-bindings/clock/r8a7795-clock.h @@ -0,0 +1,31 @@ +#ifndef __DT_BINDINGS_CLOCK_RCAR_GEN3_H__ +#define __DT_BINDINGS_CLOCK_RCAR_GEN3_H__ + +/* CPG */ +#define RCAR_GEN3_CLK_MAIN 0 +#define RCAR_GEN3_CLK_PLL0 1 +#define RCAR_GEN3_CLK_PLL1 2 +#define RCAR_GEN3_CLK_PLL2 3 +#define RCAR_GEN3_CLK_PLL3 4 +#define RCAR_GEN3_CLK_PLL4 5 + +/* MSTP0 */ + +/* MSTP1 */ + +/* MSTP2 */ + +/* MSTP3 */ +#define RCAR_GEN3_CLK_IRDA 10 + +/* MSTP5 */ + +/* MSTP7 */ + +/* MSTP8 */ + +/* MSTP9 */ + +/* MSTP10 */ + +#endif /* __DT_BINDINGS_CLOCK_RCAR_GEN3_H__ */