From patchwork Fri Sep 18 02:02:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7212431 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 ED9E1BEEC1 for ; Fri, 18 Sep 2015 02:02:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6F89206B5 for ; Fri, 18 Sep 2015 02:02:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0EDB2062E for ; Fri, 18 Sep 2015 02:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494AbbIRCCu (ORCPT ); Thu, 17 Sep 2015 22:02:50 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:54117 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752472AbbIRCCt (ORCPT ); Thu, 17 Sep 2015 22:02:49 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 18 Sep 2015 11:02:48 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id AD9FD42AEC; Fri, 18 Sep 2015 11:02:48 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id A3C5D1806F; Fri, 18 Sep 2015 11:02:48 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 9F4571800A; Fri, 18 Sep 2015 11:02:48 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id MAJ22082; Fri, 18 Sep 2015 11:02:48 +0900 X-IronPort-AV: E=Sophos;i="5.17,550,1437404400"; d="scan'";a="195904778" Received: from mail-pu1apc01lp0016.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.16]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 18 Sep 2015 11:02:47 +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 SIXPR06MB0608.apcprd06.prod.outlook.com (10.160.237.15) with Microsoft SMTP Server (TLS) id 15.1.268.17; Fri, 18 Sep 2015 02:02:45 +0000 Message-ID: <87a8sk1oai.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 02/18 v3] arm64: renesas: r8a7795: add I2C 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 CC: Magnus , In-Reply-To: <87d1xg1oc7.wl%kuninori.morimoto.gx@renesas.com> References: <87twqs1osz.wl%kuninori.morimoto.gx@renesas.com> <87d1xg1oc7.wl%kuninori.morimoto.gx@renesas.com> Date: Fri, 18 Sep 2015 02:02:45 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS1PR01CA0007.jpnprd01.prod.outlook.com (25.161.225.145) To SIXPR06MB0608.apcprd06.prod.outlook.com (25.160.237.15) X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0608; 2:EKvkhmUJA6vrflJHALQhIn4Dtm+ycEBrSzOj4t5XG4Xh/sYWwjrYtFiwZFnev2r/1FGql+REUZskmuQcIH7Un0T1cSOdCFZBc6beEgO8ToXMbCqS633dEAH63biwFo0vo/8f6iYUe7GrIbnyW+UNaaR5If1hXUDeI4dA9p7m5L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mSdYjF1RA9XATM/U6deIs+L3eVvTGIZ2lbxv89F79BrXyXfDlmLPRWp4O2t5earw9IVfSy+pgPN3oe7gx3mfyXeSb9/ZGW1sshSU7JCUWhYMIgyILwPW+S7isM7r4mfXKNukmFCrRmnLhiOhyqnp+Ve1P1DbSOJ3D89ODYHAC8ytFMQUoZbERPVN580YvBwFjEwvXNwv6XaC0aE2kiYM+BM2N26CcxEaKVfS2M99D6AEaakfAnMOLu39KrnSGOLEbGEEuQ5nQHGkvDFEwsBERcBC3NSN5i5mYTsZog4pH/SEdLpXv8CvZEcMOMvJk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(8121501046)(520078)(520075)(3002001); SRVR:SIXPR06MB0608; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB0608; X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(2950100001)(92566002)(42186005)(40100003)(19580395003)(86362001)(229853001)(5001860100001)(46102003)(110136002)(81156007)(5001830100001)(77156002)(77096005)(189998001)(5007970100001)(4001540100001)(97736004)(68736005)(122386002)(4001350100001)(62966003)(33646002)(53416004)(83506001)(46406003)(69596002)(19580405001)(47776003)(23726002)(76176999)(50466002)(106356001)(5004730100002)(54356999)(64706001)(36756003)(5001960100002)(101416001)(50986999)(105586002)(66066001)(87976001); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB0608; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SIXPR06MB0608; 23:SneOsolbsrc1RhhgjgT+y1gmd8MxXB24+OLzgoo5e?= =?us-ascii?Q?SsXnKLxZ9EkSKL8e+aZSsGtSv3JGpe9QtsaslJNbD5A3OAKfYM4XpaX5zi7J?= =?us-ascii?Q?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0yiw4bchVBn?= =?us-ascii?Q?DKN/+wGklv9/vFKy6S0A9QKHTQYrOdM54HDnA96sszjfsSry877pvQp7mW2D?= =?us-ascii?Q?tfJpwgaqCihfh8iYnXjVhRYgG74UTmMolTxl3N/oUzXFZbMNJNyv7LNVDEkE?= =?us-ascii?Q?qUkfmt9Lz221MHFYGxMaf5mjjOi9wAG6bOOnBIUQg+9u/bsvQ8vyZzvffjIj?= =?us-ascii?Q?nuEuiQPF3kW/rZNZXDOrCBmN1A9fPUwveMCCr2tcADWEl9m6ICtuAzGnHNn6?= =?us-ascii?Q?UjngSsKk2aKNL1Jsbg=3D?= X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0608; 5:YTlW5LdZWkfcO34pMmnXj8AHLVB+axDmR0Ws1mLvy+cRwfK6UgDtTUgbA4g2mMl/dPm+i/f4O3iYzuWdGV/cQGqprRalKmOAqRWZTTpv5aCTLfbo3dWccrxAhb1Ld/oQ0W4+MmVW2Kx5/OzgvK9+vQ==; 24:n+umiOcgfLw7PvjKBdPK0U3pDjW5K1yi/swtQ31ThaQYD9YIVW6tybtHq6x7Ve0fgaVH5Ut1MnrGmyxGr9zAq7LwVsanDh/EJ+p5Ek3Hevc=; 20:qT7x3gypw2VuTPF6r2uGhLJIQtpJObcbFeQAhEtdDPtOzflTjS1X2g0WTNsIRdGdLZy3D6aWUKrrhTzIQk5xLZUncubCNvK1+qoxzBYSMAs3qELhHDJwD3hW38otYtU9I70T2c3oPGGD3yU0IQZ5jK1JXV3t7EWNiy3GsuHNFuw= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2015 02:02:45.8530 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB0608 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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: Kuninori Morimoto Signed-off-by: Kuninori Morimoto --- v2 -> v3 - no change arch/arm64/boot/dts/renesas/r8a7795.dtsi | 96 ++++++++++++++++++++++++++++++- include/dt-bindings/clock/r8a7795-clock.h | 7 +++ 2 files changed, 102 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi index 31d05b6..3a82eba 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi @@ -16,6 +16,16 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; + i2c3 = &i2c3; + i2c4 = &i2c4; + i2c5 = &i2c5; + i2c6 = &i2c6; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -464,13 +474,20 @@ reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>; clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, - <&cp_clk>, <&cp_clk>; + <&cp_clk>, <&cp_clk>, + <&s3d2_clk>, <&s3d2_clk>, <&s3d2_clk>, + <&s3d2_clk>, <&s3d2_clk>, <&s3d2_clk>, + <&s3d2_clk>; #clock-cells = <1>; clock-indices = < R8A7795_CLK_GPIO7 R8A7795_CLK_GPIO6 R8A7795_CLK_GPIO5 R8A7795_CLK_GPIO4 R8A7795_CLK_GPIO3 R8A7795_CLK_GPIO2 R8A7795_CLK_GPIO1 R8A7795_CLK_GPIO0 + R8A7795_CLK_I2C6 R8A7795_CLK_I2C5 + R8A7795_CLK_I2C4 R8A7795_CLK_I2C3 + R8A7795_CLK_I2C2 R8A7795_CLK_I2C1 + R8A7795_CLK_I2C0 >; }; }; @@ -767,6 +784,83 @@ }; }; }; + + i2c0: i2c@e6500000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe6500000 0 0x40>; + interrupts = ; + clocks = <&mstp9_clks R8A7795_CLK_I2C0>; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; + + i2c1: i2c@e6508000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe6508000 0 0x40>; + interrupts = ; + clocks = <&mstp9_clks R8A7795_CLK_I2C1>; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; + + i2c2: i2c@e6510000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe6510000 0 0x40>; + interrupts = ; + clocks = <&mstp9_clks R8A7795_CLK_I2C2>; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; + + i2c3: i2c@e66d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe66d0000 0 0x40>; + interrupts = ; + clocks = <&mstp9_clks R8A7795_CLK_I2C3>; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; + + i2c4: i2c@e66d8000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe66d8000 0 0x40>; + interrupts = ; + clocks = <&mstp9_clks R8A7795_CLK_I2C4>; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; + + i2c5: i2c@e66e0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe66e0000 0 0x40>; + interrupts = ; + clocks = <&mstp9_clks R8A7795_CLK_I2C5>; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; + + i2c6: i2c@e66e8000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe66e8000 0 0x40>; + interrupts = ; + clocks = <&mstp9_clks R8A7795_CLK_I2C6>; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; }; }; diff --git a/include/dt-bindings/clock/r8a7795-clock.h b/include/dt-bindings/clock/r8a7795-clock.h index a310dfa..881788f 100644 --- a/include/dt-bindings/clock/r8a7795-clock.h +++ b/include/dt-bindings/clock/r8a7795-clock.h @@ -65,6 +65,13 @@ #define R8A7795_CLK_GPIO2 10 #define R8A7795_CLK_GPIO1 11 #define R8A7795_CLK_GPIO0 12 +#define R8A7795_CLK_I2C6 18 +#define R8A7795_CLK_I2C5 19 +#define R8A7795_CLK_I2C4 27 +#define R8A7795_CLK_I2C3 28 +#define R8A7795_CLK_I2C2 29 +#define R8A7795_CLK_I2C1 30 +#define R8A7795_CLK_I2C0 31 /* MSTP10 */