From patchwork Thu Jul 26 13:22:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10545893 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5FD16139A for ; Thu, 26 Jul 2018 13:22:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DB292B29E for ; Thu, 26 Jul 2018 13:22:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4126D2B2CA; Thu, 26 Jul 2018 13:22:18 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 70E4B2B29E for ; Thu, 26 Jul 2018 13:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730146AbeGZOjI (ORCPT ); Thu, 26 Jul 2018 10:39:08 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:43268 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729410AbeGZOjH (ORCPT ); Thu, 26 Jul 2018 10:39:07 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180726132214euoutp0109cd74259cc1f3e3d49a5df5fb3c1056~E7eOFIC8r1143911439euoutp01h; Thu, 26 Jul 2018 13:22:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180726132214euoutp0109cd74259cc1f3e3d49a5df5fb3c1056~E7eOFIC8r1143911439euoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1532611334; bh=/8B8zkBUyraV/SfJNPv4M3gX5IbzJspcQQJSfZHrmXY=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=CKyjxfIxgNN77lAF5jgyOwXh07vCX79bj0LTCA+NJ7Y/SCxHeDw9yp1EbmDRciyr3 Acnq2Cl8XLiuqs8kI2tkVwad40ZgPDfvdf/fAjREN9yYwkcos9dy2jALFR+jHkHZXI PMh7BTyhLVRlXcDgtaJelzF39mjZGTpQy1btRkMY= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180726132214eucas1p1183692560b6dfc3101fdf51fbb63da6b~E7eNi22BM2778827788eucas1p1s; Thu, 26 Jul 2018 13:22:14 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 68.D4.04627.50BC95B5; Thu, 26 Jul 2018 14:22:13 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180726132213eucas1p221b5ec5eb4a5e9c9d2ff1d76c7b26b2c~E7eMwLlsn1484414844eucas1p2U; Thu, 26 Jul 2018 13:22:13 +0000 (GMT) X-AuditID: cbfec7f2-0edff70000021213-a8-5b59cb05983f Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 59.A9.04183.50BC95B5; Thu, 26 Jul 2018 14:22:13 +0100 (BST) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PCH00A0J6H0QG80@eusync3.samsung.com>; Thu, 26 Jul 2018 14:22:13 +0100 (BST) From: Andrzej Hajda To: Krzysztof Kozlowski Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC Date: Thu, 26 Jul 2018 15:22:09 +0200 Message-id: <20180726132209.18127-1-a.hajda@samsung.com> X-Mailer: git-send-email 2.18.0 In-reply-to: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsWy7djPc7qspyOjDbZsMLC4te4cq8XGGetZ LeYfAbKufH3PZnH+/AZ2ixnn9zFZrD1yl92B3WPTqk42j/vdx5k8+rasYvT4vEkugCWKyyYl NSezLLVI3y6BK2P9tefsBa2CFcdO3GJuYPzI28XIySEhYCIxsXEWWxcjF4eQwApGiQsX7rFA OJ8ZJeY29LPAVN19cZEdIrGMUeLctFWMEM5/RokFJ3ewgVSxCWhK/N18E8wWAbKv//3OClLE LPCBUeLtkUnsIAlhAR+JMy0/wGwWAVWJB/uPM4HYvAIWEq9232aGWCcv8fB4OyOIzSkQLPH7 3iyo+F9WidVLZCBsF4l35zcxQtjCEq+Ob2GHsGUkLk/uhjq7XqJp5hVmkCMkBDoYJU4sXs4G kbCWOHz8IiuIzSzAJzFp23SgIg6gOK9ER5sQRImHxP8rN6C+XMIosXvhJ/YJjJILGBlWMYqn lhbnpqcWG+allusVJ+YWl+al6yXn525iBEbe6X/HP+1g/Hop6RCjAAejEg+vxpyIaCHWxLLi ytxDjBIczEoivPpbIqOFeFMSK6tSi/Lji0pzUosPMUpzsCiJ80r7AFULpCeWpGanphakFsFk mTg4pRoYxR5YWy8pXc3GV/X3WGBDwYuOzk1Wcx4s8qwvOa7k9aupP9anOLhJ/vonPcVTbwui 1hl2Nq3r5mp7dXbZjpumx482LG1gdHs6j5VPYMqx9/OfMX87tafG0HeZx2k+bj4bn5Q9QXuc f24qf/dn4eMnt/d+t+bNf8RnUaJfF3NJMyZZo+Xl5QghJZbijERDLeai4kQAAlZSCLgCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpiluLIzCtJLcpLzFFi42I5/e/4VV3W05HRBl+fcFrcWneO1WLjjPWs FvOPAFlXvr5nszh/fgO7xYzz+5gs1h65y+7A7rFpVSebx/3u40wefVtWMXp83iQXwBLFZZOS mpNZllqkb5fAlbH+2nP2glbBimMnbjE3MH7k7WLk5JAQMJG4++IiexcjF4eQwBJGiTevT7KB JIQEGpkk1h/QBLHZBDQl/m6+CRYXAbKv//3OCtLALPCJUeLu+vuMIAlhAR+JMy0/2EFsFgFV iQf7jzOB2LwCFhKvdt9mhtgmL/HweDtYPadAsMT0I4eZIZYFSHzpWMQ0gZFnASPDKkaR1NLi 3PTcYiO94sTc4tK8dL3k/NxNjMCQ2Xbs55YdjF3vgg8xCnAwKvHwXpgZES3EmlhWXJl7iFGC g1lJhFd/S2S0EG9KYmVValF+fFFpTmrxIUZpDhYlcd7zBpVRQgLpiSWp2ampBalFMFkmDk6p BsZZDGcnLzzO3cCm/4O/6HrWtPcP3jZFl7d8S9xyUaEncMrqaedkuI7Ju0qd6ZeZeuzppcua gmx8wcGvz3w25WTUVPlY+HLadGXWnYqts0JjWX9e/Tez9eXLfYz+m3RKCw4sNJ3AvHtJb6Nu S1tcTJyNzsQ/X8Pnf9Y6mj5lipex2Pq1TSkXxXSVWIozEg21mIuKEwGtccFMFQIAAA== X-CMS-MailID: 20180726132213eucas1p221b5ec5eb4a5e9c9d2ff1d76c7b26b2c X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180726132213eucas1p221b5ec5eb4a5e9c9d2ff1d76c7b26b2c References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP HDMI-DDC for unknown reasons doesn't work with Exynos I2C controllers. Fortunately i2c-gpio comes to the rescue. Signed-off-by: Andrzej Hajda --- arch/arm/boot/dts/exynos5250-arndale.dts | 28 ++++++++++++++++------- arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 6 +++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index 816d89d4cefd..e7a9b9aa85f1 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -211,7 +211,7 @@ &hdmi { status = "okay"; - ddc = <&i2c_2>; + ddc = <&i2c_ddc>; hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; vdd_osc-supply = <&ldo10_reg>; vdd_pll-supply = <&ldo8_reg>; @@ -513,13 +513,6 @@ }; }; -&i2c_2 { - status = "okay"; - /* used by HDMI DDC */ - samsung,i2c-sda-delay = <100>; - samsung,i2c-max-bus-freq = <66000>; -}; - &i2c_3 { status = "okay"; @@ -608,3 +601,22 @@ status = "okay"; samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; }; + +&soc { + /* + * For unknown reasons HDMI-DDC does not work with Exynos I2C + * controllers. Lets use software I2C over GPIO pins as a workaround. + */ + i2c_ddc: i2c-gpio { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_gpio_bus>; + status = "okay"; + compatible = "i2c-gpio"; + gpios = <&gpa0 6 0 /* sda */ + &gpa0 7 0 /* scl */ + >; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; +}; diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi index 6ff6dea29d44..b25d520393b8 100644 --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi @@ -225,6 +225,12 @@ samsung,pin-drv = ; }; + i2c2_gpio_bus: i2c2-gpio-bus { + samsung,pins = "gpa0-6", "gpa0-7"; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + uart2_data: uart2-data { samsung,pins = "gpa1-0", "gpa1-1"; samsung,pin-function = ;