From patchwork Thu Aug 6 08:05:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6956991 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 1E5FDC05AC for ; Thu, 6 Aug 2015 08:05:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCCE82068C for ; Thu, 6 Aug 2015 08:05:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E2F920688 for ; Thu, 6 Aug 2015 08:05:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754614AbbHFIFv (ORCPT ); Thu, 6 Aug 2015 04:05:51 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:28492 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932096AbbHFIFp (ORCPT ); Thu, 6 Aug 2015 04:05:45 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 06 Aug 2015 17:05:43 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id F0E7B5553F; Thu, 6 Aug 2015 17:05:43 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id CFD11480A4; Thu, 6 Aug 2015 17:05:43 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id CE244480A7; Thu, 6 Aug 2015 17:05:43 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id TAJ05532; Thu, 6 Aug 2015 17:05:43 +0900 X-IronPort-AV: E=Sophos;i="5.15,622,1432566000"; d="scan'";a="191916971" Received: from mail-hk2apc01lp0216.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.216]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 06 Aug 2015 17:05:43 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; 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; Thu, 6 Aug 2015 08:05:41 +0000 Message-ID: <87si7wyhde.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 03/13 v4][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 , Geert Uytterhoeven CC: YOSHIYUKI ITO , Magnus , Linux-SH , Gaku Inami , shimoda , munakata , komatsu , goda In-Reply-To: <87wpx8yhhm.wl%kuninori.morimoto.gx@renesas.com> References: <87wpx8yhhm.wl%kuninori.morimoto.gx@renesas.com> Date: Thu, 6 Aug 2015 08:05:41 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0030.jpnprd01.prod.outlook.com (25.164.162.140) To HK2PR06MB0594.apcprd06.prod.outlook.com (25.161.187.145) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0594; 2:3Vf9ob1S0qpGs/4F6q9acPilmSsmtRbEzpEjYqowdZJJHNwU73WUR26lbOKtoZjThk4rXnFkHntOK4C6/g3gGvdWN2uq4qhJVuEo1fMxsF4LRvJl6ga3u9o6E5dJnIXKzajFkfivJjFTPk55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w6nSR9E3b5pDos+4CxMnTQlbw4+n32wzLlfcjDuFBzfbLKdYYHW3huFYp6+KMZgqJHOX6vMkR13gTKkcJIowsQIuJLUDSWeVlw+N8pjSpF3uGJ0i97bM14b4xuBYe83m6Z1tfMx2aWu04/WJN9ok4RTUZzH9goLMYuj4CwAuZWG30q871WMFIMdvSveiUjVZKxJQn/Dl+8oD+DLRgVqjWATkhlMnTJGAzmG6bLTuhPsSYJGEPY+EOt/8P3xWjlILP+cnAHt/H2fK2cRAFMWSEH4eLlhCsX7f3WuoTC8= 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: 06607E485E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(4001540100001)(575784001)(33646002)(189998001)(83506001)(101416001)(50466002)(77096005)(5001770100001)(5001860100001)(68736005)(105586002)(81156007)(106356001)(229853001)(5001830100001)(69596002)(76176999)(87976001)(107886002)(97736004)(54356999)(5001960100002)(50986999)(23726002)(2950100001)(86362001)(92566002)(36756003)(46102003)(42186005)(4001350100001)(47776003)(46406003)(122386002)(64706001)(19580405001)(66066001)(53416004)(62966003)(19580395003)(77156002)(40100003)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0594; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB0594; 23:xf4rg59YsdUEwj6+HK5nuHDMdMdath3vwNbA6bR1K?= =?us-ascii?Q?RfXsNVzFEqVVDHEvW78Cm83DzQSJI79FozEf6PKGjUpZCi1XnjFRulOgRqe7?= =?us-ascii?Q?6fivbdli9nWKDr/m4P8tkBL66sZqqWwSuoQOKNQ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TF1tr1KZDdR8Sjzv3+eYkje1BrB3h27ZMxdfVvuHWBlEsnEjDp6KdP91sZb?= =?us-ascii?Q?R8gk5cRne2NAH5TrgIH8yCMKuzMF2HZWku/FGwUkmSjfkPcMaInVFD7orE6s?= =?us-ascii?Q?ldSZ6dg2dz7yfc0zVx3QufagPYo//t1EFCRtHbBudSUZ0NwMuDWsNEITp3ma?= =?us-ascii?Q?NUPN1wLOyGFMlZJuBhzXhRAy8pElIzfkDc9L8qrRnZNnICJo01wY9fuSTZwA?= =?us-ascii?Q?uz6nGqO8M+pr0JHph4=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0594; 5:8QjVlsLYa1kSsABVxEzDOaviRqM40sQK8YVDneMsFaaMvngiQYqyBXLyWYMfKktyZspd2ikHZMS6vuDy8QKuHJhL7oBdlaRQlxBxEF3Xt1VZcMTMQYdO2Nmk1n9UbyATAlEkAS57oUu3nrEOzchDzA==; 24:KjAmyXaILPaiIaRYTwbF+kovdfCiwMkxNX/13LK5eb+CNhTdt5F5gcdrc4TTsHJM06PI+xA+FoCN0pLM8Fp9uY3PUqW9odY7BPBGzTQ2ySQ=; 20:BdQnjGzUtOoX5xbA5VOv1YJwci0Kslu0f2NtLDHy1GhuPFj5VIgmjb/ltad5djSv05VeK8rhaXiZV+QOBB0SzN/n51zIap8wuPQudEK1+3pQxfL2S2XeUXGbt49hejiiUcxzAJtHQpDvjq03VY3ju1avNpNv1+9HwFVg++zm67I= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2015 08:05:41.3319 (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 --- v3 -> v4 - use simple-bus topology - remove IRDA from clock.h - RCAR_GEN3_CLK_xxxx -> RCAR_R8A7795_CLK_xxxx 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 | 30 +++++++ 6 files changed, 132 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..2375b2d --- /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"; + #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"; + }; + }; + + extal_clk: extal_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + clock-output-names = "extal"; + }; + + soc { + compatible = "simple-bus"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + 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; + + p_clk: p_clk { + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks RCAR_R8A7795_CLK_PLL1>; + #clock-cells = <0>; + clock-div = <24>; + clock-mult = <1>; + clock-output-names = "p"; + }; + + 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"; + }; + }; + }; +}; diff --git a/include/dt-bindings/clock/r8a7795-clock.h b/include/dt-bindings/clock/r8a7795-clock.h new file mode 100644 index 0000000..4097b0b --- /dev/null +++ b/include/dt-bindings/clock/r8a7795-clock.h @@ -0,0 +1,30 @@ +#ifndef __DT_BINDINGS_CLOCK_RCAR_R8A7795_H__ +#define __DT_BINDINGS_CLOCK_RCAR_R8A7795_H__ + +/* CPG */ +#define RCAR_R8A7795_CLK_MAIN 0 +#define RCAR_R8A7795_CLK_PLL0 1 +#define RCAR_R8A7795_CLK_PLL1 2 +#define RCAR_R8A7795_CLK_PLL2 3 +#define RCAR_R8A7795_CLK_PLL3 4 +#define RCAR_R8A7795_CLK_PLL4 5 + +/* MSTP0 */ + +/* MSTP1 */ + +/* MSTP2 */ + +/* MSTP3 */ + +/* MSTP5 */ + +/* MSTP7 */ + +/* MSTP8 */ + +/* MSTP9 */ + +/* MSTP10 */ + +#endif /* __DT_BINDINGS_CLOCK_RCAR_R8A7795_H__ */