From patchwork Sun Nov 6 20:20:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9414047 X-Patchwork-Delegate: horms@verge.net.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4563D60515 for ; Sun, 6 Nov 2016 20:21:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 382CE28F1A for ; Sun, 6 Nov 2016 20:21:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D0EE28F8E; Sun, 6 Nov 2016 20:21:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C894128F1A for ; Sun, 6 Nov 2016 20:21:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752074AbcKFUVG (ORCPT ); Sun, 6 Nov 2016 15:21:06 -0500 Received: from sauhun.de ([89.238.76.85]:46903 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbcKFUVG (ORCPT ); Sun, 6 Nov 2016 15:21:06 -0500 Received: from p5b385663.dip0.t-ipconnect.de ([91.56.86.99]:54500 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1c3Tw7-0002rA-UG; Sun, 06 Nov 2016 21:21:04 +0100 From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org, Simon Horman Cc: linux-i2c@vger.kernel.org, Simon Horman , Wolfram Sang Subject: [PATCH v4 12/14] ARM: dts: alt: use demuxer for I2C4 Date: Sun, 6 Nov 2016 21:20:30 +0100 Message-Id: <20161106202032.5227-13-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161106202032.5227-1-wsa+renesas@sang-engineering.com> References: <20161106202032.5227-1-wsa+renesas@sang-engineering.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Simon Horman Make it possible to fallback to GPIO for I2C4 on the EXIO-B connector. This is based on reference work for the I2C0 core of the lager/r8a7790 by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased and fixed aliases] Signed-off-by: Wolfram Sang --- arch/arm/boot/dts/r8a7794-alt.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts index 81368d11e4d3be..bd5b2d2c568c52 100644 --- a/arch/arm/boot/dts/r8a7794-alt.dts +++ b/arch/arm/boot/dts/r8a7794-alt.dts @@ -19,7 +19,9 @@ aliases { serial0 = &scif2; i2c9 = &gpioi2c1; + i2c10 = &gpioi2c4; i2c11 = &i2chdmi; + i2c12 = &i2cexio4; }; chosen { @@ -149,6 +151,17 @@ i2c-gpio,delay-us = <5>; }; + gpioi2c4: i2c-10 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "i2c-gpio"; + status = "disabled"; + gpios = <&gpio4 9 GPIO_ACTIVE_HIGH /* sda */ + &gpio4 8 GPIO_ACTIVE_HIGH /* scl */ + >; + i2c-gpio,delay-us = <5>; + }; + /* * A fallback to GPIO is provided for I2C1. */ @@ -172,6 +185,18 @@ }; }; }; + + /* + * I2C4 is routed to EXIO connector B, pins 73 (SCL) + 74 (SDA). + * A fallback to GPIO is provided. + */ + i2cexio4: i2c-14 { + compatible = "i2c-demux-pinctrl"; + i2c-parent = <&i2c4>, <&gpioi2c4>; + i2c-bus-name = "i2c-exio4"; + #address-cells = <1>; + #size-cells = <0>; + }; }; &du { @@ -231,6 +256,11 @@ function = "i2c1"; }; + i2c4_pins: i2c4 { + groups = "i2c4"; + function = "i2c4"; + }; + vin0_pins: vin0 { groups = "vin0_data8", "vin0_clk"; function = "vin0"; @@ -338,6 +368,11 @@ clock-frequency = <400000>; }; +&i2c4 { + pinctrl-0 = <&i2c4_pins>; + pinctrl-names = "i2c-exio4"; +}; + &vin0 { status = "okay"; pinctrl-0 = <&vin0_pins>;