Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp832339ybk; Wed, 13 May 2020 14:27:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx0tTkb2HK4jYpLPAi73oO9bE60m0E1K5Mj7LmUFY9XM+uh+x64pG8ysLJWCrx/KEdKQs9 X-Received: by 2002:a05:6402:144a:: with SMTP id d10mr1423015edx.67.1589405228075; Wed, 13 May 2020 14:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589405228; cv=none; d=google.com; s=arc-20160816; b=YwhqlzG3j/rirSHkMkPY/ndpnXmI8vJHo7dzSi6YxpeW0XghW0VodXuIkZ7XN6Yqpo xx2RkevGEj71KiKZSYqi9WsPWzdeEG6sfktK0Swg2bTZ9JG1d6KUp9PreMZDjcdVimVR QSrfECkgat9KEf5IViOBBo6qU0oCkSxqgSM1FUNCcatS6Tevnqblunikqyunk+CsEXOF oxzkIq1xGiPrdB5aKT6mLK5vk7xTOePXPvznXiP0u1AkLSTLejNIvmJuGS7HXbYNyXK9 6SB6X4alFoPqC4pem3ctbjlQl5VtzsR5MDjd2B35Z921Drqr8HA4PF9B53YaJLCB/JvA V+1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fUDlLfMJUv/EUcoM1+7cItclF/TBlxL4LaV3+tDuIoA=; b=DkPQBq8SjsF3xd74xkxZW9HnI3opKyvIxH8eXoRveUcoOHKJ1vGjJv2bilG4neSOnE PCBUhsWTcTNwnY+9ZOBQ/XKaYz/Kr0CagV7aIrXtJK2PGlDY4IDt7r00GT05VPE4a2ag qP8T4FxQa6DJ+rftU2ikcjrDkA5aUmW5Yp2y35//JPpCw8EtmRQYbgoaB2wfsSZJucIH bJYoyruTPQxVlP/L2ld0DrpzEq73w/EB/JGyzvYNKKw4V7G2Tq5t9lGqLykL39eMMwPC lqBbA8GwUd5hNtYaFjX64UOKOaWlQ6lIdhFMa36iuvG2GV31Lq1HV0dBUCiEH8Y9gPng mdQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b="AGAtow/+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa8si603567ejb.222.2020.05.13.14.26.45; Wed, 13 May 2020 14:27:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b="AGAtow/+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729047AbgEMVZF (ORCPT + 99 others); Wed, 13 May 2020 17:25:05 -0400 Received: from vps.xff.cz ([195.181.215.36]:33716 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728519AbgEMVY6 (ORCPT ); Wed, 13 May 2020 17:24:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1589405095; bh=vP1dm4GPwt9nOrSXUHYZrlnzV+QSD/t/nvTNldUmjRI=; h=From:To:Cc:Subject:Date:From; b=AGAtow/+Ns2CtpuJASys9AiJwXRyXtcsBjbwnwXu4bag20du1XxyFuFHDrpYchGlo NiC7NU6/u9eN7M+v2qu6Bz1jd4pU4R44lCUgURa6vC8Vuzo0KD7k4xgwHXncLQOgGX t4b4TbkM6HRmS9Jm72MKnKTw/OkLwGm9ILrmaHrE= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng Cc: Ondrej Jirman , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Samuel Holland , Martijn Braam , Luca Weiss , Bhushan Shah Subject: [PATCH v3 0/5] Add support for PinePhone LCD panel Date: Wed, 13 May 2020 23:24:46 +0200 Message-Id: <20200513212451.1919013-1-megous@megous.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds support for the LCD panel of PinePhone. The first 3 patches are for the panel itself, and the last 2 patches are for enabling it on PinePhone. I've tested this on PinePhone 1.0 and 1.2. Please take a look. thank you and regards, Ondrej Jirman 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 (4): dt-bindings: vendor-prefixes: Add Xingbangda dt-bindings: panel: Add binding for Xingbangda XBD599 panel drm: panel: Add Xingbangda XBD599 panel (ST7703 controller) arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhone Ondrej Jirman (1): arm64: dts: sun50i-a64-pinephone: Add touchscreen support .../display/panel/sitronix,st7703.yaml | 63 +++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + .../allwinner/sun50i-a64-pinephone-1.1.dts | 19 + .../dts/allwinner/sun50i-a64-pinephone.dtsi | 54 +++ drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-sitronix-st7703.c | 386 ++++++++++++++++++ 7 files changed, 535 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sitronix,st7703.yaml create mode 100644 drivers/gpu/drm/panel/panel-sitronix-st7703.c -- 2.26.2