Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2786111rwd; Fri, 19 May 2023 10:07:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Tn4Ry4P+Hk5fEIruglXp172gxgm11Top88xYinfO52Ih5w9aFQY3Wm/h4D5hJdxkXXfnI X-Received: by 2002:a17:903:492:b0:1ad:ca0e:cf23 with SMTP id jj18-20020a170903049200b001adca0ecf23mr3033258plb.3.1684516069868; Fri, 19 May 2023 10:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684516069; cv=none; d=google.com; s=arc-20160816; b=uZWOiPWy+jdgV35vexKhkzE4oaCgLR8hjmcItdIkwAS8XUi54VUbpHh4qjM82tT0Ur sRXQQQfC1sBZ/O1bnejzNO/w/it0aSf1O7kcUDRM+YzUMBeLMEeGqMuPJOlR2VCAXxLm M6kWQ2Pn1K9Rs2Eds/xfUdbgCcACMyEkB716i8vJY6nqKxE+trLHRKzc45hlSNS0g52Z mbdrBq5dB0dnKPmmDsP7GGgUJwVez9bbnC2SdUrPXagXVywUg0XN3YS2CvgWhnGyTu8n fIz/68xVhJ91wt/O2ZeDDy3vrPzyaCCCZlzniCjb5g2l3yCaM0rsulAr+ryJuyjW3BHN xvnQ== 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:date:subject:cc:to:from :dkim-signature; bh=+mWDhNT3SMFA+v1ZbZMYCZbkIn1/LuleqGRVWsB+Jow=; b=VTqipB43II1GiDRKQ+pZsmJ+TeE5d/RU0lui0IlJZHIQOuL/uQGECiH1qRKRXOR/9M 9a2l94W6sz6J0elu5Wtnk/0n3KMHBpoWBddWnRQHUgrBZsoTRK3yXAI3rErK4gFxjqQe /pkpWZ0i2FUdbJjZnAvVvPihVotekJsqu6AFPQLafuUvQV1zXp+C98aHU47vlgdeWyeR ZwKZK+hwl8FlxDcOocb9gZc8fMFdNG083etzxKZlKFsKrXeJF753/5JGE5yrxoQKaTVk tC0GF2OiC/5B1EuSwfWheNuoG3hmpRkntdjfTPqZ8U4+FINmE30zTjVaguvTC62zIMiN PcVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=UgXVhO+5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 138-20020a630190000000b005346ce4f2absi95677pgb.605.2023.05.19.10.07.32; Fri, 19 May 2023 10:07:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=UgXVhO+5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbjESRES (ORCPT + 99 others); Fri, 19 May 2023 13:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231661AbjESREJ (ORCPT ); Fri, 19 May 2023 13:04:09 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB7E4134; Fri, 19 May 2023 10:04:06 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-510e419d701so4285612a12.1; Fri, 19 May 2023 10:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684515845; x=1687107845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+mWDhNT3SMFA+v1ZbZMYCZbkIn1/LuleqGRVWsB+Jow=; b=UgXVhO+5yZsmGzn0PFot/4Kn0BNDlg1KOqu2UR5vikznCDWWNxGVcSfLRebtAFH+zl NE4gH6s4NaMH3YCS2tgoUxoP2RbwmAEf6014WOXsrMUkK5yA8IOTgoNIAdzeMjOwbrf7 Ke8qQHwzvuXocaiYdS/CRP4P8kJ2aspVA5qspIlX/dmn2xalNa8xXK9qC8Yl1j4lqTVh 7fQ4RFsO0Ci7hwdE1P7uUN1fhHQ+TS51P8lzqfQtCoFjnmjOT6DthQttFMOL/yimCqjx VsGj9yjWpX6N9HiGRg7GhVygGHhdR2TgSLAII1Mn3fL27wb0EEFnsdthOeJfPV7Bl/Kq 8T5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684515845; x=1687107845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+mWDhNT3SMFA+v1ZbZMYCZbkIn1/LuleqGRVWsB+Jow=; b=PEVfyrMhoa0L7AUci9tjzj7IUnDrlfYVKfsvYFpNF1zqACQ8QQl23McvqS7Taz3SYW K4S0W4kb8peJt/ckti6zoLbJCnXcyzNMS74Jt4ZnPVRQd21ougDiWeLAUYlFuN59ZaKD 83u3sJJuUttQ4xlyVS7rKC5/ihVgGo1+ccolOorwWrVktBQ8h5cC0Yo4cOt3Q1UkN7Bd SpPHO+Gr1APh60J1ByjXvCjn/TI7bNRzIU2Z6l9SFjPqdQGO02CdY1dSn1+myFOqXguy lDaSuxsdK10bRSuO9Phj6KIj3mD5t5pCY3qsXNR5fm2pLhPDkgft9zb+B9bMsf9xSx8f rrxg== X-Gm-Message-State: AC+VfDxZhSQMYq9LKmbBXcHYo/ESg03w4w7GNvqrSZN04NFklIJWgTO/ v6CVkiOodQ804yLj/6yCsHs= X-Received: by 2002:a17:907:928b:b0:969:faf3:7dba with SMTP id bw11-20020a170907928b00b00969faf37dbamr2432478ejc.52.1684515844971; Fri, 19 May 2023 10:04:04 -0700 (PDT) Received: from localhost.my.domain (83.11.222.198.ipv4.supernova.orange.pl. [83.11.222.198]) by smtp.gmail.com with ESMTPSA id mf13-20020a170906cb8d00b00965ffb8407asm2489988ejb.87.2023.05.19.10.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 10:04:04 -0700 (PDT) From: Artur Weber To: thierry.reding@gmail.com Cc: Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin , Neil Armstrong , Artur Weber Subject: [PATCH v5 2/3] drm/panel: Add Samsung S6D7AA0 panel controller driver Date: Fri, 19 May 2023 19:03:53 +0200 Message-Id: <20230519170354.29610-3-aweber.kernel@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230519170354.29610-1-aweber.kernel@gmail.com> References: <20230519170354.29610-1-aweber.kernel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Initial driver for S6D7AA0-controlled panels. Currently, the following panels are supported: - S6D7AA0-LSL080AL02 (Samsung Galaxy Tab 3 8.0) - S6D7AA0-LSL080AL03 (Samsung Galaxy Tab A 8.0 2015) - S6D7AA0-LTL101AT01 (Samsung Galaxy Tab A 9.7 2015) It should be possible to extend this driver to work with other panels using this IC. Tested-by: Nikita Travkin #ltl101at01 Signed-off-by: Artur Weber --- Changed in v2: - Removed unused panel_name property from desc struct Changed in v4: - Added LSL080AL03 and LTL101AT01 panels - Added DSI-controlled backlight support for panels that support it - Renamed command defines: CMD_* -> MCS_* - Dropped s6d7aa0_bl_ctl_on (not universal across panels) - Dropped MIPI_DSI_MODE_LPM flag - Added vmipi-supply, renamed enable-supply to power-supply Changed in v5: - Changed compatible to avoid concatenating multiple model numbers --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 585 ++++++++++++++++++ 3 files changed, 593 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 2b9d6db7860b..203c0ef0bbfd 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -553,6 +553,13 @@ config DRM_PANEL_SAMSUNG_S6D27A1 This panel can be found in Samsung Galaxy Ace 2 GT-I8160 mobile phone. +config DRM_PANEL_SAMSUNG_S6D7AA0 + tristate "Samsung S6D7AA0 MIPI-DSI video mode panel controller" + depends on OF + depends on BACKLIGHT_CLASS_DEVICE + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS + config DRM_PANEL_SAMSUNG_S6E3HA2 tristate "Samsung S6E3HA2 DSI video mode panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index ff169781e82d..30cf553c8d1d 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -54,6 +54,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D27A1) += panel-samsung-s6d27a1.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0) += panel-samsung-s6d7aa0.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c new file mode 100644 index 000000000000..f532aa018428 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c @@ -0,0 +1,585 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Samsung S6D7AA0 MIPI-DSI TFT LCD controller drm_panel driver. + * + * Copyright (C) 2022 Artur Weber + */ + +#include +#include +#include +#include +#include +#include +#include + +#include