From patchwork Thu Oct 18 07:33:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10646813 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 7DFDD3B73 for ; Thu, 18 Oct 2018 07:35:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E527286BA for ; Thu, 18 Oct 2018 07:35:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 620DA286D5; Thu, 18 Oct 2018 07:35:03 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D06A5286D7 for ; Thu, 18 Oct 2018 07:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=oyGSGHvQ/R6UY+WZNslTu5oE9XGHtnrXPhpmyqeYWAU=; b=YS3 Tuod2yvW77cx2bzGd6mMxU5KAa2H3mSIuWMSQURV3YQNVO7EsyurPT50xQOlPyjlId8TzrSom08hE JCpapH4gsHF+IxWgCxAy8Bk37PX/QFUII37Zsqyfk8oTH+ZERzUw48U9Fd42TjUBGlnJe70BLHzro iotdOdvBsARz3H/1YdAh2XqnaEFQl8jnYQ/HKgctSluB5pnf78d4LuuDYjGruIL7JsTWCrLC1RAeu Bk3oUXGM38gYbYiOjXRuD9pxgBjz5aY4x3FMrXXAn0olfPCkoFYdQGYfbFhFvdHaw9BQnF1QRb3T7 KyeUONZRG7J+zotweMWtfDPbUF3At1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gD2pS-0001jv-RN; Thu, 18 Oct 2018 07:34:46 +0000 Received: from chocolate.maple.relay.mailchannels.net ([23.83.214.35]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gD2ok-0001Nv-9y for linux-arm-kernel@lists.infradead.org; Thu, 18 Oct 2018 07:34:05 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1D79A3E13A9; Thu, 18 Oct 2018 07:33:51 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.11.179]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id DC5BC3E3088; Thu, 18 Oct 2018 07:33:49 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [199.195.250.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Thu, 18 Oct 2018 07:33:51 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Scare-Thread: 1a270fb67938d94c_1539848030874_753046973 X-MC-Loop-Signature: 1539848030874:3198415560 X-MC-Ingress-Time: 1539848030873 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 93DFE15D251; Thu, 18 Oct 2018 07:33:44 +0000 (UTC) From: Icenowy Zheng To: David Airlie , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Archit Taneja , Andrzej Hajda , Laurent Pinchart Subject: [PATCH 0/9] Analogix ANX6345 RGB-(e)DP bridge support Date: Thu, 18 Oct 2018 15:33:18 +0800 Message-Id: <20181018073327.64942-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181018_003402_524333_65BB6628 X-CRM114-Status: GOOD ( 17.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset brings the support for Analogix ANX6345 RGB-(e)DP bridge, which is used by some Allwinner A64 laptops, such as Pinebook and Olimex TERES-I. It reuses some definitions from the ANX78xx driver that already exists in the kernel tree, but the driver code itself is rewritten, because the big difference between ANX6345 and ANX78xx. This patchset also enables the bridge on Pinebook and TERES-I, and a temporary workaround patch (do not merge) for the dot clock accuracy problem of sun4i-drm. This patchset assumes some fixes ([1], [2] and [3]) are already applied, without them the patchset cannot be tested on the A64 devices mentioned above. [1] https://patchwork.kernel.org/patch/10628827/ [2] https://patchwork.kernel.org/patch/10628825/ [3] https://patchwork.kernel.org/patch/10646791/ Chen-Yu Tsai (1): [DO NOT MERGE] drm/sun4i: rgb: Add 5% tolerance to dot clock frequency check Icenowy Zheng (8): drm/bridge: move ANA78xx driver to analogix subdirectory drm/bridge: split some definitions of ANX78xx to dedicated headers drm/bridge: extract some Analogix I2C DP common code dt-bindings: Add ANX6345 DP/eDP transmitter binding drm/bridge: Add Analogix anx6345 support arm64: allwinner: a64: add pinmux for RGB666 LCD arm64: allwinner: a64: enable ANX6345 bridge on Pinebook arm64: allwinner: a64: enable ANX6345 bridge on TERES-I .../bindings/display/bridge/anx6345.txt | 39 + .../dts/allwinner/sun50i-a64-pinebook.dts | 43 + .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 40 +- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 9 + drivers/gpu/drm/bridge/Kconfig | 10 - drivers/gpu/drm/bridge/Makefile | 4 +- drivers/gpu/drm/bridge/analogix-anx78xx.h | 719 --------------- drivers/gpu/drm/bridge/analogix/Kconfig | 25 + drivers/gpu/drm/bridge/analogix/Makefile | 4 + .../drm/bridge/analogix/analogix-anx6345.c | 862 ++++++++++++++++++ .../bridge/{ => analogix}/analogix-anx78xx.c | 146 +-- .../drm/bridge/analogix/analogix-anx78xx.h | 265 ++++++ .../drm/bridge/analogix/analogix-i2c-dptx.c | 169 ++++ .../drm/bridge/analogix/analogix-i2c-dptx.h | 258 ++++++ .../bridge/analogix/analogix-i2c-txcommon.h | 240 +++++ drivers/gpu/drm/sun4i/sun4i_rgb.c | 5 +- 16 files changed, 1956 insertions(+), 882 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/bridge/anx6345.txt delete mode 100644 drivers/gpu/drm/bridge/analogix-anx78xx.h create mode 100644 drivers/gpu/drm/bridge/analogix/analogix-anx6345.c rename drivers/gpu/drm/bridge/{ => analogix}/analogix-anx78xx.c (90%) create mode 100644 drivers/gpu/drm/bridge/analogix/analogix-anx78xx.h create mode 100644 drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.c create mode 100644 drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.h create mode 100644 drivers/gpu/drm/bridge/analogix/analogix-i2c-txcommon.h Tested-by: Vasily Khoruzhick