From patchwork Thu Jul 2 08:14:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11638089 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9963A13B4 for ; Thu, 2 Jul 2020 08:16:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 73BFA20720 for ; Thu, 2 Jul 2020 08:16:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="0li5m1a5"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="TuDIr0w+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73BFA20720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=qyCjoHfsKDMOw3OG/9ACQnokTPidfBhM9JueyvNcCpY=; b=0li5m1a59bwnS9Hd1bHr7e4I6p PQ7usvJnnui2Zso2ciAZbyjhNWnJ0Rmk6OxD2mayUwBzPnCNky6dxmgM163HTuXZzW2PMxqDPDnBc YByNgy2mrWD7GYFpUxHE7m0CvxQxQBGKYp6ArOXcoEZO4YDQV7sPsLXK+dzBJUxqXDt1rm5QslTMs nX/Qkh3Sk1/WU101M+TePbnSHinKQlh3O+RbwxZOU1rhtKj7xllBjG0UvdNTIRGauif/37yb6s3KV MVIxkWP9WlM+CS+ZKUmyhpwyPMgV6enq4SxBJtYeWHFvNSkEV3Fe/cnGNBGE2hps1ZMb3d2T7zzc/ aTmAWnuQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jquN0-00053Q-4s; Thu, 02 Jul 2020 08:14:58 +0000 Received: from vps.xff.cz ([195.181.215.36]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jquMt-00051Q-Gh for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 08:14:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593677688; bh=a2NHJHG5QFB78AfgGChp//7c+qQXotdIBgRIWgVfJDE=; h=From:To:Cc:Subject:Date:From; b=TuDIr0w+fvaEOEp60tG2KqaKHJVb92lJc4yrQ0nKOjryG4ilZm9tHPPVcTCAzrkin bpjLMe/r/Q0o8YvLMcIUnIgHLLLp98RTlQzymcEaHoX3N9OUW5servjpbjFikeAIQv 3beDDnDl50a/QmKRZ3/YbMhgduvkQVEyF8LHALLc= From: Ondrej Jirman To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng Subject: [PATCH v8 0/2] Add support for PinePhone LCD panel Date: Thu, 2 Jul 2020 10:14:30 +0200 Message-Id: <20200702081432.1727696-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_041451_883602_DC64D8BA X-CRM114-Status: GOOD ( 18.24 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, Samuel Holland , Bhushan Shah , linux-kernel@vger.kernel.org, Luca Weiss , Martijn Braam , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patchset adds support for the LCD panel of PinePhone. I've tested this on PinePhone 1.0 and 1.2. Please take a look. thank you and regards, Ondrej Jirman Changes in v8: - Drop goodix,gt911 fallback compatible (Icenowy) - Drop address/size-cells from &dsi node (Maxime) - Drop already applied patches - v7->v8 diff: https://megous.com/dl/tmp/v7-v8.patch Changes in v7: - Removed mode.vrefresh, rebased onto next-20200701 - v6->v7 diff: https://megous.com/dl/tmp/v6-v7.patch Changes in v6: - Fixed spacing in yaml - Fixed wrong vccio->iovcc supply name in the bindings doc - I noticed that the original driver uses a delay of 20ms in the init function to achieve a combined total of 120ms required from post-reset to display_on. I've added a similar delay to xbd599_init, so that xbd599 panel also has the right timing. (patch 9) - v5->v6 diff: https://megous.com/dl/tmp/v5-v6.patch - Added review/ack tags - Learned to run dt_binding_check by myself ;) Changes in v5: - rewritten on top of rocktech-jh057n00900 driver - rocktech-jh057n00900 renamed to st7703 (controller name) - converted rocktech-jh057n00900 bindings to yaml and extended for xbd599 Changes in v4: - use ->type from the mode instead of hardcoding (Samuel) - move init_sequence to ->prepare (Samuel) - move anti-flicker delay to ->enable, explain it (Samuel) - add enter_sleep after display_off (Samuel) - drop ->disable (move code to ->unprepare) - add ID bytes dumping (Linus) (I can't test it since allwinner DSI driver has a broken dcs_read function, and I didn't manage to fix it.) - document magic bytes (Linus) - assert reset during powerup - cleanup powerup timings according to the datasheet Changes in v3: - Panel driver renamed to the name of the LCD controller - Re-organize the driver slightly to more easily support more panels based on the same controller. - Add patch to enable the touchscreen to complete the LCD support on PinePhone. - Dropped the "DSI fix" patch (the driver seems to work for me without it) - Improved brightness levels handling: - PinePhone 1.0 uses default levels generated by the driver - On PinePhone 1.1 duty cycles < 20% lead to black screen, so default levels can't be used. Martijn Braam came up with a list of duty cycle values that lead to perception of linear brigtness level <-> light intensity on PinePhone 1.1 - There was some feedback on v2 about this being similar to st7701. It's only similar in name. Most of the "user commands" are different, so I opted to keep this in a new driver instead of creating st770x. Anyone who likes to check the differences, here are datasheets: - https://megous.com/dl/tmp/ST7703_DS_v01_20160128.pdf - https://megous.com/dl/tmp/ST7701.pdf Changes in v2: - DT Example fix. - DT Format fix. - Raised copyright info to 2020. - Sort panel operation functions. - Sort inclusion. -- For phone owners: -- There's an open question on how to set the backlight brightness values on post 1.0 revision phone, since lower duty cycles (< 10-20%) lead to backlight being black. It would be nice if more people can test the various backlight levels on 1.1 and 1.2 revision with this change in dts: brightness-levels = <0 1000>; num-interpolated-steps = <1000>; and report at what brightness level the backlight turns on. So far it seems this has a wide range. Lowest useable duty cycle for me is ~7% on 1.2 and for Martijn ~20% on 1.1. Icenowy Zheng (1): arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhone Ondrej Jirman (1): arm64: dts: sun50i-a64-pinephone: Add touchscreen support .../allwinner/sun50i-a64-pinephone-1.1.dts | 19 +++++++ .../dts/allwinner/sun50i-a64-pinephone.dtsi | 52 +++++++++++++++++++ 2 files changed, 71 insertions(+)