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: 10647227 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 2E87A13B0 for ; Thu, 18 Oct 2018 13:18:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20BED2834A for ; Thu, 18 Oct 2018 13:18:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 150E4283A2; Thu, 18 Oct 2018 13:18:37 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B98722834A for ; Thu, 18 Oct 2018 13:18:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DB5776E10A; Thu, 18 Oct 2018 13:18:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bongo.maple.relay.mailchannels.net (bongo.maple.relay.mailchannels.net [23.83.214.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 495E46E472 for ; Thu, 18 Oct 2018 07:33:51 +0000 (UTC) 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-Mailman-Approved-At: Thu, 18 Oct 2018 13:18:22 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development 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 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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