From patchwork Thu Jul 26 10:12:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10545513 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 1458414BC for ; Thu, 26 Jul 2018 10:12:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0097C285C7 for ; Thu, 26 Jul 2018 10:12:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E524B2862D; Thu, 26 Jul 2018 10:12:49 +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 13F0B285C7 for ; Thu, 26 Jul 2018 10:12:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729157AbeGZL24 (ORCPT ); Thu, 26 Jul 2018 07:28:56 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:52394 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729053AbeGZL24 (ORCPT ); Thu, 26 Jul 2018 07:28:56 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180726101246euoutp02d6f5aa950a0de3ca3bb84dc829d2d946~E44y7JAv92726727267euoutp02R; Thu, 26 Jul 2018 10:12:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180726101246euoutp02d6f5aa950a0de3ca3bb84dc829d2d946~E44y7JAv92726727267euoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1532599966; bh=0qfgx0IsWMjHxFIalxvLXBHxNp2F33VTYzSX+2lj9v4=; h=From:To:Cc:Subject:Date:References:From; b=MFv8NSXkih9eChj9iS6yj4aPaQR8oerEnYVKeWQUR3Sk0GYnPi9zM28YMYCxa/mRi DscBFlHAFX2KQcvA+xJzautG7D94p1s6K1+wl9IhLYUOsp+u7duPKsPK1ApYT/+idu 2deJBgw8+Q2Kpb3rbtHYWCoyCcp96wFRNe6rpgGQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180726101246eucas1p2d360872794e4674c729ba4d4b8a56449~E44yQkuMF1986519865eucas1p20; Thu, 26 Jul 2018 10:12:46 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 1E.E2.05751.D9E995B5; Thu, 26 Jul 2018 11:12:45 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180726101245eucas1p16d84c77490d9eb81300f38c2f3fb34a5~E44xn0_5V1590115901eucas1p1n; Thu, 26 Jul 2018 10:12:45 +0000 (GMT) X-AuditID: cbfec7f4-c47ff70000001677-4a-5b599e9dbe18 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id AE.92.04178.D9E995B5; Thu, 26 Jul 2018 11:12:45 +0100 (BST) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PCG00LV9XP8AQ50@eusync1.samsung.com>; Thu, 26 Jul 2018 11:12:45 +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 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC Date: Thu, 26 Jul 2018 12:12:27 +0200 Message-id: <20180726101228.14956-1-a.hajda@samsung.com> X-Mailer: git-send-email 2.18.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprMIsWRmVeSWpSXmKPExsWy7djPc7pz50VGG/Q9MbS4te4cq8XGGetZ LeYfAbKufH3PZnH+/AZ2ixnn9zFZrD1yl92B3WPTqk42j/vdx5k8+rasYvT4vEkugCWKyyYl NSezLLVI3y6BK+PV9KNsBe/5Kzpv/2dvYPzP08XIySEhYCJxt6uXCcQWEljBKDHrqlMXIxeQ /ZlR4ub0I0AJDrCit89lIGqWMUp09HtC1PxnlJi74z8jSIJNQFPi7+abbCC2CJB9/e93VpAi ZoEPjBJvj0xiBxkkLOApcfNGCojJIqAqMe2fKkg5r4CFxJn3axkh7pGXeHi8Hcp+yiqx5qQ/ hO0i8fpHIxuELSzx6vgWdghbRqKz4yAThF0v0TTzCjPIWgmBDkaJE4uXQzVYSxw+fpEVxGYW 4JOYtG06M8RfvBIdbUIQJR4SfQfnsUP8GCux/fRJ1gmMEgsYGVYxiqeWFuempxYb5aWW6xUn 5haX5qXrJefnbmIERtXpf8e/7GDc9SfpEKMAB6MSD6/GnIhoIdbEsuLK3EOMEhzMSiK8y9Mi o4V4UxIrq1KL8uOLSnNSiw8xSnOwKInzSvsAVQukJ5akZqemFqQWwWSZODilGhjDbPeaWVz6 3C670tjol0rAF2XRhLmzZgTrSprvyPLMbS7RieDzFLOx41/jaRxcKc89tyHkiTbbpLk5U/he yMYwftPmf7xJ9PXkTwaZ/Yq2VU+sGH9OSo7Re6OW9dCky/Z0r4qgcQCzgHpK/rVyqe9XVXhU ehh3PGY2DD55qrr3nkTkMbUEJZbijERDLeai4kQAnxul7qYCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBJMWRmVeSWpSXmKPExsVy+t/xy7pz50VGG3zrFLa4te4cq8XGGetZ LeYfAbKufH3PZnH+/AZ2ixnn9zFZrD1yl92B3WPTqk42j/vdx5k8+rasYvT4vEkugCWKyyYl NSezLLVI3y6BK+PV9KNsBe/5Kzpv/2dvYPzP08XIwSEhYCLx9rlMFyMXh5DAEkaJGzfaWCCc RiaJT1MvM3cxcnKwCWhK/N18kw3EFgGyr//9zgpSxCzwiVHi7vr7jCCThAU8JW7eSAExWQRU Jab9UwUp5xWwkDjzfi0jiC0hIC/x8Hg74wRGrgWMDKsYRVJLi3PTc4sN9YoTc4tL89L1kvNz NzEC/b/t2M/NOxgvbQw+xCjAwajEw3thZkS0EGtiWXFl7iFGCQ5mJRHe5WmR0UK8KYmVValF +fFFpTmpxYcYpTlYlMR5zxtURgkJpCeWpGanphakFsFkmTg4pRoY27u+7Lj1fcHpf9P4n13y aq1d9uWmbNf9NcVeHMcSxD6HWwZ8m3BgS2jaF67Lp978ftf8+zuDxRsWR9UrM837v77/tJf/ uwSfn3Me2/X5Ttc7P+oxMXxU1+JXZ333IE7g35Im/f1/ROROzJfQqS/76fRh4h8LX7fooxkK m7ep1CYGWevx878yUmIpzkg01GIuKk4EAOqBQqb7AQAA X-CMS-MailID: 20180726101245eucas1p16d84c77490d9eb81300f38c2f3fb34a5 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180726101245eucas1p16d84c77490d9eb81300f38c2f3fb34a5 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 | 24 +++++++++++++++-------- arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 6 ++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index 816d89d4cefd..591023391f7d 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,18 @@ status = "okay"; samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; }; + +&soc { + 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 = ; From patchwork Thu Jul 26 10:12:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10545515 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 BEEEC14BC for ; Thu, 26 Jul 2018 10:12:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE207285E5 for ; Thu, 26 Jul 2018 10:12:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1C26286F5; Thu, 26 Jul 2018 10:12:53 +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 8D73C285E5 for ; Thu, 26 Jul 2018 10:12:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729075AbeGZL3A (ORCPT ); Thu, 26 Jul 2018 07:29:00 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:52415 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729053AbeGZL3A (ORCPT ); Thu, 26 Jul 2018 07:29:00 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180726101250euoutp026ab835d70b762580c1085a447cd9d53e~E442CrJcL2693126931euoutp02d; Thu, 26 Jul 2018 10:12:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180726101250euoutp026ab835d70b762580c1085a447cd9d53e~E442CrJcL2693126931euoutp02d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1532599970; bh=+Z4UnOmJNJpGoanRckrdG8GGkpmekw6a0tXYMy/iEp4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=H1LFgd5oUaykRyMoCILX7PluG7MF441cbJcy1ifWQE50zbvvG5rT7/gVKKAbHP57s 0tk2ykEHf4FIn8LZzexFwHgvjTue7juMuExHpYsm/VHJ2kDGUY98KETwoomFEtq1Bo zHubpVPZniGq/B4JK8AM4PmvinetO4cR3XFWYKss= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180726101249eucas1p28544f1328c5fe11df5125224944d79a9~E441RAUSn1620916209eucas1p2A; Thu, 26 Jul 2018 10:12:49 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 6F.E8.61560.0AE995B5; Thu, 26 Jul 2018 11:12:49 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180726101248eucas1p14ede2f90176b93f0bfde1808b494abbd~E440bMRhy1428914289eucas1p1h; Thu, 26 Jul 2018 10:12:48 +0000 (GMT) X-AuditID: cbfec7f5-207ff7000002f078-8a-5b599ea0c417 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id A0.A2.04178.0AE995B5; Thu, 26 Jul 2018 11:12:48 +0100 (BST) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PCG00LV9XP8AQ50@eusync1.samsung.com>; Thu, 26 Jul 2018 11:12:48 +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 2/2] ARM: dts: exynos: arndale: fix HDMI-HPD line handling Date: Thu, 26 Jul 2018 12:12:28 +0200 Message-id: <20180726101228.14956-2-a.hajda@samsung.com> X-Mailer: git-send-email 2.18.0 In-reply-to: <20180726101228.14956-1-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRmVeSWpSXmKPExsWy7djPc7oL50VGG0xuYrK4te4cq8XGGetZ LeYfAbKufH3PZnH+/AZ2ixnn9zFZrD1yl92B3WPTqk42j/vdx5k8+rasYvT4vEkugCWKyyYl NSezLLVI3y6BK+Po9UVsBUe4KzZ9fsDcwHiXs4uRk0NCwETi5qpW9i5GLg4hgRWMEvvmL2aB cD4zSnz/O5sRpurShJtsILaQwDJGiZf7wyCK/jNKLGu7zAKSYBPQlPi7GaJIBMi+/vc7K0gR s8AHRom3RyaxgySEBbwk2tvbmUFsFgFViXuz74DFeQUsJE43bmKH2CYv8fB4O9BmDg5OAUuJ mXuMQOZICPxlldiz7yQrRI2LxIRtf6CuE5Z4dXwLVK+MRGfHQSYIu16iaeYVZojmDkaJE4uX s0EkrCUOH78INohZgE9i0rbpzCDLJAR4JTrahCBKPCReH+uChksPo8SVO+1MExglFzAyrGIU Ty0tzk1PLTbOSy3XK07MLS7NS9dLzs/dxAiMu9P/jn/dwbjvT9IhRgEORiUe3gszI6KFWBPL iitzDzFKcDArifAuT4uMFuJNSaysSi3Kjy8qzUktPsQozcGiJM4r7QNULZCeWJKanZpakFoE k2Xi4JRqYJz2YuKVzs1LG6VY0/7ML41mY33RvX76xpXCWfodE6fv8i5ZfcbsyI+a2vUyOrkN /bUvDVx8AydJtbH1yrGGmbnaX5ix8jSXK9OxxikPRMR8/OyaozW1D243X3BZ+/m9JRUaP39/ ePzAaNrGnS+LpHTfVh3OcYpbsDzFQHFJgMfnqP1Hk1gDfyqxFGckGmoxFxUnAgBzVCnxtwIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpiluLIzCtJLcpLzFFi42I5/e/4Zd0F8yKjDR5NE7S4te4cq8XGGetZ LeYfAbKufH3PZnH+/AZ2ixnn9zFZrD1yl92B3WPTqk42j/vdx5k8+rasYvT4vEkugCWKyyYl NSezLLVI3y6BK+Po9UVsBUe4KzZ9fsDcwHiXs4uRk0NCwETi0oSbbF2MXBxCAksYJdp2zGGB cBqZJOZsXscCUsUmoCnxdzNIFSeHCJB9/e93VpAiZoFPjBJ3199nBEkIC3hJtLe3M4PYLAKq Evdm32EHsXkFLCRON25ih1gnL/HweDtQPQcHp4ClxMw9RiBhIaCSGUeamSYw8ixgZFjFKJJa WpybnltsqFecmFtcmpeul5yfu4kRGDLbjv3cvIPx0sbgQ4wCHIxKPLwXZkZEC7EmlhVX5h5i lOBgVhLhXZ4WGS3Em5JYWZValB9fVJqTWnyIUZqDRUmc97xBZZSQQHpiSWp2ampBahFMlomD U6qBUSpUOcRmxh/h7d7t9vc3OYSHfe5+v+7Hc6fjB+unXO9L4tB25VDbu+b6WlXtCxZsam+9 PeJd363wNpFdl8MZGZaewa6dGvcjOePuVDHbwI/PD5ytYX88L9/qeoFwtIWzKleyndQmvawb /g9/qU9UFea9YfGjJoXR/NbjsqzdIkd0i6e6flmtxFKckWioxVxUnAgAMLF+HBUCAAA= X-CMS-MailID: 20180726101248eucas1p14ede2f90176b93f0bfde1808b494abbd X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180726101248eucas1p14ede2f90176b93f0bfde1808b494abbd References: <20180726101228.14956-1-a.hajda@samsung.com> 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-HPD was set active low, moreover by default pincontrol chip sets pull-down on the pin. As a result HDMI driver assumes TV is always connected regardless of actual state. The patch fixes it. Signed-off-by: Andrzej Hajda --- arch/arm/boot/dts/exynos5250-arndale.dts | 4 +++- arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index 591023391f7d..26bae5157177 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -210,9 +210,11 @@ }; &hdmi { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_hpd>; status = "okay"; ddc = <&i2c_ddc>; - hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; + hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>; vdd_osc-supply = <&ldo10_reg>; vdd_pll-supply = <&ldo8_reg>; vdd-supply = <&ldo8_reg>; diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi index b25d520393b8..d31a68672bfa 100644 --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi @@ -599,6 +599,11 @@ samsung,pin-pud = ; samsung,pin-drv = ; }; + + hdmi_hpd: hdmi-hpd { + samsung,pins = "gpx3-7"; + samsung,pin-pud = ; + }; }; &pinctrl_1 {