From patchwork Mon Jan 22 11:29:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 10178291 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 6CAF0602B7 for ; Mon, 22 Jan 2018 11:32:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5707427F4B for ; Mon, 22 Jan 2018 11:32:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4939427EE2; Mon, 22 Jan 2018 11:32:29 +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 CA23227EE2 for ; Mon, 22 Jan 2018 11:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751037AbeAVLc1 (ORCPT ); Mon, 22 Jan 2018 06:32:27 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:44872 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751058AbeAVLcZ (ORCPT ); Mon, 22 Jan 2018 06:32:25 -0500 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 22 Jan 2018 20:32:25 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id DC650735CA; Mon, 22 Jan 2018 20:32:24 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.46,396,1511794800"; d="scan'208";a="270272014" Received: from unknown (HELO be1yocto.ree.adwin.renesas.com) ([172.29.43.62]) by relmlii2.idc.renesas.com with ESMTP; 22 Jan 2018 20:32:21 +0900 From: Biju Das To: Rob Herring , Mark Rutland Cc: Wolfram Sang , Simon Horman , Magnus Damm , Chris Paterson , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-i2c@vger.kernel.org, Biju Das Subject: [PATCH vY 2/2] ARM: dts: iwg22d-sodimm: use demuxer for I2C5 Date: Mon, 22 Jan 2018 11:29:23 +0000 Message-Id: <1516620563-7965-3-git-send-email-biju.das@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516620563-7965-1-git-send-email-biju.das@bp.renesas.com> References: <1516620563-7965-1-git-send-email-biju.das@bp.renesas.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 Create a separate bus for audiocodec related I2C5 and provide fallback to GPIO. Based on work for r8a7794/Alt by Wolfram Sang: "ARM: dts: alt: use demuxer for I2C1" Signed-off-by: Biju Das Reviewed-by: Chris Paterson --- arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 44 +++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts index a4058f4..b2ea43f 100644 --- a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts +++ b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts @@ -42,6 +42,8 @@ ethernet0 = &avb; serial3 = &scif4; serial5 = &hscif1; + i2c9 = &gpioi2c5; + i2c11 = &i2caudiocodec; }; chosen { @@ -55,6 +57,36 @@ clock-frequency = <26000000>; }; + gpioi2c5: i2c-9 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "i2c-gpio"; + status = "disabled"; + scl-gpios = <&gpio0 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio0 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <5>; + }; + + /* + * A fallback to GPIO is provided for I2C5. + */ + i2caudiocodec: i2c-11 { + compatible = "i2c-demux-pinctrl"; + i2c-parent = <&i2c5>, <&gpioi2c5>; + i2c-bus-name = "i2c-audiocodec"; + #address-cells = <1>; + #size-cells = <0>; + + sgtl5000: codec@a { + compatible = "fsl,sgtl5000"; + #sound-dai-cells = <0>; + reg = <0x0a>; + clocks = <&audio_clock>; + VDDA-supply = <®_3p3v>; + VDDIO-supply = <®_3p3v>; + }; + }; + rsnd_sgtl5000: sound { compatible = "simple-audio-card"; simple-audio-card,format = "i2s"; @@ -126,19 +158,9 @@ &i2c5 { pinctrl-0 = <&i2c5_pins>; - pinctrl-names = "default"; + pinctrl-names = "i2c-audiocodec"; - status = "okay"; clock-frequency = <400000>; - - sgtl5000: codec@a { - compatible = "fsl,sgtl5000"; - #sound-dai-cells = <0>; - reg = <0x0a>; - clocks = <&audio_clock>; - VDDA-supply = <®_3p3v>; - VDDIO-supply = <®_3p3v>; - }; }; &pci1 {