From patchwork Thu Sep 17 04:25:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7201861 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 165FBBEEC1 for ; Thu, 17 Sep 2015 04:25:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BFFB208F4 for ; Thu, 17 Sep 2015 04:25:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8AAA208F6 for ; Thu, 17 Sep 2015 04:25:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbbIQEZ3 (ORCPT ); Thu, 17 Sep 2015 00:25:29 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:44168 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751814AbbIQEZZ (ORCPT ); Thu, 17 Sep 2015 00:25:25 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 17 Sep 2015 13:25:24 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id ADC92413C2; Thu, 17 Sep 2015 13:25:24 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 9AF9E2806E; Thu, 17 Sep 2015 13:25:24 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 961292806D; Thu, 17 Sep 2015 13:25:24 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id PAN17094; Thu, 17 Sep 2015 13:25:24 +0900 X-IronPort-AV: E=Sophos;i="5.17,543,1437404400"; d="scan'";a="195830161" Received: from mail-pu1apc01lp0024.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.24]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 17 Sep 2015 13:25:23 +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 SIXPR06MB0605.apcprd06.prod.outlook.com (10.160.237.147) with Microsoft SMTP Server (TLS) id 15.1.274.16; Thu, 17 Sep 2015 04:25:22 +0000 Message-ID: <87k2rp7k24.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 08/20 v2] arm64: renesas: r8a7795: add I2C support User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Simon , Magnus , Linux-SH In-Reply-To: <87vbb97kci.wl%kuninori.morimoto.gx@renesas.com> References: <87vbb97kci.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 17 Sep 2015 04:25:22 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS1PR01CA0015.jpnprd01.prod.outlook.com (25.161.225.153) To SIXPR06MB0605.apcprd06.prod.outlook.com (25.160.237.147) X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0605; 2:m6bDdb9o6VTKvxk+OI30zr7KlBPDyAyf0PtVW09BX7IeqTX1kGb8j6WXqfAhkCFx94YCP88XRmq1Z7QGTePToyVaiqA1IYS0UY6rfuQy2xSyIxD1daPwBNj6a5gx69MRGwL5QPV72Q7dQWzG6qatqdLbZNq/6R0ojAuK3j0puhc=; 3:KN1qmiJ5qViL9d8sLwGZBq4ulVhuhzLdEdr2lCoS2qtpGA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wFcLsPmvCidjTXkacxOWKBHOt7ZZNYh+25WIgUt0z0HZlvgvatGunP9Hd6CqZNsojwnyr5zpniuOrWyvpuH5qpwfOvoxZRBdwhZMISn2pdkZ6/kqqSzEwNRm9p/MxBv/srZjuwt7efKCCsqigiBKki2cR7vQsw7EU1Dt6ysmPZtE71HZF/eQBFYdnvMI8LvWmSmvalbrA1VReCRJmB/0p9gwfsvRVg+R7oY03ET2QQX30Jrd8g== 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)(3002001); SRVR:SIXPR06MB0605; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB0605; X-Forefront-PRVS: 07025866F6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(2950100001)(46406003)(46102003)(68736005)(23726002)(97736004)(53416004)(5001770100001)(5001860100001)(77096005)(5001830100001)(81156007)(4001540100001)(42186005)(77156002)(5004730100002)(62966003)(5007970100001)(5001920100001)(66066001)(69596002)(54356999)(76176999)(101416001)(4001350100001)(19580395003)(33646002)(19580405001)(50986999)(40100003)(36756003)(92566002)(189998001)(87976001)(122386002)(106356001)(86362001)(64706001)(5001960100002)(107886002)(105586002)(47776003)(83506001)(229853001)(50466002); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB0605; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SIXPR06MB0605; 23:L9EoHQHDHUoEecoWDSAaXqy7mTutHUVr22BDjPg/y?= =?us-ascii?Q?fv/p/+09z/thZ/zb0oeh/Cv8byRpvU1nYVTtTZeE8n8X8iYZwN1cJ9X5Z8R5?= =?us-ascii?Q?VYbxkkluKgDBkEFghM6T0Iqm+Y04sTOLePypjKaDj+34pvzSzPcBEBmBseoi?= =?us-asc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EUwBe1IuXzKKrXx?= =?us-ascii?Q?Sr4ytMvcnEgh84rNsIZxtAmRO5C7xiJgLSjzs3BdjdPPuLvzOFcs43tgy/Nf?= =?us-ascii?Q?yxOTfDJwlxBjHp1x7evAM2bmURGaAOfvT31N2qhX9/djA4VOO2FPG+2Wo6Wx?= =?us-ascii?Q?i2LOFQBuRxMd2+9RndYJ36woqqW+cwgbUcO5ch174e4OZ0yCnc8tSogjZCxc?= =?us-ascii?Q?Q1zKhLmeb4Qut2SyqDUGOFg+DTprdR7jnGxb7bbLE5kB3BgDSBOvVweLqeeE?= =?us-ascii?Q?pYohSU4YSUjleJP2rv2jI8=3D?= X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0605; 5:VdAsrv1XTNgXDjKKe20cN7suW4bNhNZXWTXO91EQkfoQvhAEpjI2CoRM8UQnmhZ9JiN20V1GlYGY+dyzq92TUXyxW9XkQ3L/K0PxRgF0Qaflb+TL8SzC+miZpDVkP45YxWe5XrA2FjE4sk2+bBQE7A==; 24:u0DOaep/Oqx7LTrmWB2MJMcCpVgJR9YuA+CTblq19mp4h2cfLhPBeCiOfYWEKXhnwlWz86miBCO5tJtI4J2bxZCu8hAFQ/DrIB28aB8Rv9U=; 20:559LfzI6ywsPwZ7AIpBTWAi5/XrBOpxr+rSGuODvAk8azcL+YIPHYtxb/ke3gPcGj9mDzIKAx37+kvJ9IsGb6rpM4HSLpHKzsJmJsWMydgTie3E4/ht4Aumln16L4cfaUmlwxUv2UserEbjcm6u5XD/XQ3jLcR6BjLYBDuy2skI= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2015 04:25:22.1830 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB0605 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 Reviewed-by: Geert Uytterhoeven --- v1 -> v2 - use power-domains - add Geert's Reviewed-by 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 */