Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp622230pxu; Wed, 7 Oct 2020 11:20:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/o3Ty1ZVtZ4kp6JnfbiFaUwJFc4dQYJEX8ZVHdrGE91LQaGNo3itzTnA5CeapPXabFUP8 X-Received: by 2002:a17:906:b04e:: with SMTP id bj14mr4919332ejb.254.1602094856767; Wed, 07 Oct 2020 11:20:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602094856; cv=none; d=google.com; s=arc-20160816; b=sGgSlW7TWgRSxHO1YVfRsSzGhfOgP6afkQ6De3mx0hU41mafOfE1tSuxy/6dBM4LZ2 egwKy8cMUEdBCCPlDvphSR0z0ZDiAfA2N247GO1LJ8APSITMIrhGtUjo0bjARLu51B2V 6AtNVi3b9aJp9w2Akm7my6HK2LCLBJwP4unRp7HTe1hotrH/4vX5bgd7tIiJXyrwK2Bk +EC/fqEbJLMceE6Xnu4V7LCdoDRbh5DASr97FL9zu1sknzvPrfluwy3Rf2zsTP8qMdeo Wu/a07KziN/NTilA/wVAhlN/zbmH1QBxakqGJOKeMddpPu0d9QemPewvD6u9K1qJiUSu h8kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=lr01I54W83dQfyPAXxNgr/K8XWBKrwkLjst7BnhvlRw=; b=yQ9XeaI1zONMFDCFmTSdLGSpW3XlqgLsJuagQluD5m3vBEOsz6/EIX1LIOQagV2ajZ D1GpxBN0krRGyWaCFzxWwcBCtP97hsVjhX8Axa5ERcTfFtAew2bCDiNpKbOjaWsMT3Cv jt/0wQjTE0ps77VJYEuG6NHJ9MbKZb2NVMHKPYpgsbVsauhLUdih9uocgYwGIfh6wgzJ RUsE21D3o+4oY07datwDOYqsqRAn/H32scAsdI3AbKGoLY5cKZHJtdfelxuUPD5yu6Wb 4KKMu/ajLwlNtAHzwPNRSNnpl+kQ46K0y8Ud7MgMGOlTcC4ZFfc9CEan//veFw0B1KeS wtxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@connolly.tech header.s=protonmail header.b=m4IwO25Y; 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=connolly.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e18si2022935ejk.628.2020.10.07.11.20.33; Wed, 07 Oct 2020 11:20:56 -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=@connolly.tech header.s=protonmail header.b=m4IwO25Y; 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=connolly.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728363AbgJGRtQ (ORCPT + 99 others); Wed, 7 Oct 2020 13:49:16 -0400 Received: from mail-02.mail-europe.com ([51.89.119.103]:46634 "EHLO mail-02.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728343AbgJGRtQ (ORCPT ); Wed, 7 Oct 2020 13:49:16 -0400 X-Greylist: delayed 1742 seconds by postgrey-1.27 at vger.kernel.org; Wed, 07 Oct 2020 13:49:14 EDT Date: Wed, 07 Oct 2020 17:49:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1602092951; bh=lr01I54W83dQfyPAXxNgr/K8XWBKrwkLjst7BnhvlRw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=m4IwO25YmBvfEuEDwWD9+/JIVWz3wLdO4TFRyPG1WcCwENR5IyUuhFHcZQWwmdnX8 S/Ty7oK4JDv+R/AXBtsKyrB/RPQXzC/T0lebh5X2Rdh1if76+jGkzy/VGdXXVF0KaI FQDURiePjNj+dim/L1r9YwEFP+e5bcudISZ5kwlM= To: linux-arm-msm@vger.kernel.org, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter From: Caleb Connolly Cc: ~postmarketos/upstreaming@lists.sr.ht, Caleb Connolly , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Reply-To: Caleb Connolly Subject: [PATCH 1/5] drm/panel/oneplus6: Add panel-oneplus6 Message-ID: <20201007174736.292968-2-caleb@connolly.tech> In-Reply-To: <20201007174736.292968-1-caleb@connolly.tech> References: <20201007174736.292968-1-caleb@connolly.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit adds support for the display panels used in the OnePlus 6 / T devices. The OnePlus 6/T devices use different panels however they are functionally identical with much of the commands being shared. The panels don't appear to be used by any other devices some combine them as one driver that is specific to the devices. The panels are: samsung,sofef00 and samsung,s6e3fc2x01 Signed-off-by: Caleb Connolly --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-oneplus6.c | 418 +++++++++++++++++++++++++ 3 files changed, 431 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-oneplus6.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index de2f2a452be5..d72862265400 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -229,6 +229,18 @@ config DRM_PANEL_OLIMEX_LCD_OLINUXINO =09 Say Y here if you want to enable support for Olimex Ltd. =09 LCD-OLinuXino panel. =20 +config DRM_PANEL_ONEPLUS6 +=09tristate "OnePlus 6/6T Samsung AMOLED DSI command mode panels" +=09depends on OF +=09depends on DRM_MIPI_DSI +=09depends on BACKLIGHT_CLASS_DEVICE +=09select VIDEOMODE_HELPERS +=09help +=09 Say Y or M here if you want to enable support for the Samsung AMOLED +=09 command mode panels found in the OnePlus 6/6T smartphones. + +=09 The panels are 2280x1080@60Hz and 2340x1080@60Hz respectively + config DRM_PANEL_ORISETECH_OTM8009A =09tristate "Orise Technology otm8009a 480x800 dsi 2dl panel" =09depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefil= e index e45ceac6286f..017539056f53 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) +=3D panel-nec-nl8= 048hl11.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) +=3D panel-novatek-nt35510.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT39016) +=3D panel-novatek-nt39016.o obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) +=3D panel-olimex-lcd-olinuxi= no.o +obj-$(CONFIG_DRM_PANEL_ONEPLUS6) +=3D panel-oneplus6.o obj-$(CONFIG_DRM_PANEL_ORISETECH_OTM8009A) +=3D panel-orisetech-otm8009a.o obj-$(CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS) +=3D panel-osd-osd101t2587-53= ts.o obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) +=3D panel-panasonic-vvx10f= 034n00.o diff --git a/drivers/gpu/drm/panel/panel-oneplus6.c b/drivers/gpu/drm/panel= /panel-oneplus6.c new file mode 100644 index 000000000000..5e212774b1e0 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-oneplus6.c @@ -0,0 +1,418 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Copyright (c) 2020 Caleb Connolly + * Generated with linux-mdss-dsi-panel-driver-generator from vendor device= tree: + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Caleb Connolly + */ + +#include +#include +#include +#include +#include +#include + +#include