From patchwork Thu Sep 27 11:48:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10618419 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 ED655913 for ; Thu, 27 Sep 2018 18:27:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D81D32BAA1 for ; Thu, 27 Sep 2018 18:27:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC17B2BAB8; Thu, 27 Sep 2018 18:27:34 +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 8273C2BAA1 for ; Thu, 27 Sep 2018 18:27:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1561E89170; Thu, 27 Sep 2018 18:27:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id E509B6E597 for ; Thu, 27 Sep 2018 11:49:15 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id 85-v6so1780453pge.6 for ; Thu, 27 Sep 2018 04:49:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fk58cSXZTK0sAssbOY4VE2UzZCdh2VtQSbb4Fk1bPPw=; b=cNa8Dg7J1DVLe/eLyqXtAW5iWsQZRrzRDtnCCc0kIE0rzocjOtmLJVk4aHp72C2Ngj DsTfyDDNhHruSN81ceKrXQzksky6AI5OhqRhA2w+QHgvnmFm3GYKWKo8Ksi40waR5Cxs 9+lr4vss3mD9Gun73P+oJNgdVj/kk0ZtRPKcbEcQ6zBZMOjnNJNM+Hh1W0R34W1AVgkQ CGPRdv9qy68FPKaR8qRm0Ujkcr+9G52yLiYJucb+QAD+stegy05VTbugELZc1qXjQN3x f1mcWB3B0MeQuXqxb78tu5ctDML9+xX30P7f8b+clrJSCAc3grx5KqCkqpIwp8Gwi/NK W3XA== X-Gm-Message-State: ABuFfoiKkcWjtwOEdYamO2CjYcjHohpAu4U05GIviwOhEeApldbF6af0 /xZYhLPYvYT6YnniIgqf+2Gh2A== X-Google-Smtp-Source: ACcGV62SJhxEAY/YSd58yNgq3ARi2LleHW2CdJBGFxNeS8nNVNL4hE5eg8Z3/LCMZe39UApoo5CbKA== X-Received: by 2002:a62:5343:: with SMTP id h64-v6mr11043928pfb.226.1538048954532; Thu, 27 Sep 2018 04:49:14 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:49:13 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 00/12] drm/sun4i: Allwinner A64 MIPI-DSI support Date: Thu, 27 Sep 2018 17:18:38 +0530 Message-Id: <20180927114850.24565-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Sep 2018 18:27:00 +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: Jagan Teki Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This series add MIPI-DSI support on Allwinner A64. The same A31 controller is reused and tweaked for A64 since the register space for both SoC's look same. The current clock rate (270MHz) with nkm (5,2,11) from PLL_MIPI is unable to work with A64 DSI block. I've tested with few changes to verify desired nkm divider values (1, 2, 5) but with existing nkm divider logic(ccu_nkm_find_best) I'm unable to figure out the desired clock rate, anyone suggestion please let me know here. Bananapi S070WV20-CT16 DSI panel with BPI-M64 board works fine, but will figure out and fix the clock logic in next versions. Thanks, Jagan. Jagan Teki (12): clk: sunxi-ng: a64: Fix gate bit of DSI DPHY drm/sun4i: sun6i_mipi_dsi: Add Allwinner A64 MIPI DSI support dt-bindings: sun6i-dsi: Add compatible for A64 MIPI DSI drm/sun4i: sun6i_mipi_dsi: Enable missing DSI bus clock drm/sun4i: sun6i_mipi_dsi: Add DSI Generic short write 2 param transfer drm/sun4i: sun6i_mipi_dsi: Fix VBP size calculation drm/sun4i: sun6i_mipi_dsi: Fix TCON DRQ set bits drm/sun4i: sun6i_mipi_dsi: Refactor vertical video start delay dt-bindings: panel: Add Bananapi S070WV20-CT16 MIPI-DSI panel bindings drm/panel: Add Bananapi S070WV20-CT16 MIPI-DSI panel driver arm64: dts: allwinner: a64: Add DSI pipeline arm64: dts: allwinner: bananapi-m64: Bananapi S070WV20-CT16 DSI panel .../panel/bananapi,s070wv20-ct16-dsi.txt | 21 ++ .../bindings/display/sunxi/sun6i-dsi.txt | 1 + .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 42 +++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 44 +++ drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 2 +- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-bananapi-s070wv20.c | 336 ++++++++++++++++++ drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 78 +++- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 5 + 10 files changed, 522 insertions(+), 17 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt create mode 100644 drivers/gpu/drm/panel/panel-bananapi-s070wv20.c