Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1688159rdb; Thu, 7 Dec 2023 06:22:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGTIlLlKKVAnkczWSledX1Osoo8yR9YkVx+00RJYYraQQXZuZ3qUPHRYkCoBtMopQthl00V X-Received: by 2002:a05:6a20:c192:b0:18f:97c:977e with SMTP id bg18-20020a056a20c19200b0018f097c977emr2941609pzb.102.1701958976388; Thu, 07 Dec 2023 06:22:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958976; cv=none; d=google.com; s=arc-20160816; b=YcBHKLKplgTTsTHxjQPs8Z15ZsvHB1GaW9aMp18ioNDYEA6G/3m3AfHi+54jQaYT34 P0oxFTFTPw2wlodTfapLIsx5jIB2toSChMI8kQkNcXbN/ygCwAsrul0XIkOcdGdsaPOH 0jilZr9yiv987QqNICrj29QmWi57HSkgxdUrAoVLPfNbdw5iz4uEN6j6i0fZSY5Xtyn2 Hx82VTwvu/KxX5yVOgOxiLUfTPMsf9crjBt5QEjdIUeihtlCfPSwvv+f59xeeeOGz7G8 2l0tZlHoHJGZicEFD/IEOU8mh2LrQQ3j18Z4cf3vUYsS2v0yCSwbYBiilQLbrF9yU7Fr CwwQ== 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=GVh6PC472lZgerr4mfywa9L9+B1rFGAMxmajJY6iaoU=; fh=YMCpMfj2GNScjLvWYsHyWUGLqrAoIyNb9XBc8eC5U/M=; b=nKXy9HisORPqXc4lyI0m1fX0FU2pgVKxRxkz5Fo2mQ7chaiIwbgId4K8BK1h953Zoj Jg7pbVKQ1Kbt/vROQCe8iwJEn41oQIlJHEb8v/aZN2aYDHmZVcIaNn+oPbMwpt2iVOPu nkv+m7BhAHnhwG8fNnFAXEpvuDF+lZ6XX/DKem6sE12Qgq2wOiy1sMdHoBj7vpfF7nTp Cqv0N4iFcsPa4kgd6izFmSbEoUi6I2eGFJf0PzfAld5vBc8tbcm6JReVlPaO8/7G3HVB psQfkON86FkHBE75eRoS5rBENrYw5scEYaDnPGJ198ICvmrb7mmwKJKMcSQr4HyAqQAv wnkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DPCdSiq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id q17-20020a056a00089100b00690dbd360basi1310327pfj.152.2023.12.07.06.22.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:22:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DPCdSiq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 663CD828FAF5; Thu, 7 Dec 2023 06:22:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443342AbjLGOWY (ORCPT + 99 others); Thu, 7 Dec 2023 09:22:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443193AbjLGOWA (ORCPT ); Thu, 7 Dec 2023 09:22:00 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D44AB26BF for ; Thu, 7 Dec 2023 06:17:51 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a1915034144so127722566b.0 for ; Thu, 07 Dec 2023 06:17:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958655; x=1702563455; darn=vger.kernel.org; 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=GVh6PC472lZgerr4mfywa9L9+B1rFGAMxmajJY6iaoU=; b=DPCdSiq4+9jLK+vE5Zge4QU6NmeQfxbFikCRSoAl17qLDo4jMf20nuhcSNNsLePsEx rgJODC/qtVVLXnuPK6WHEvKubhidPjVsX/1TRAm95twE/FukDvQjONcEULhw2BDqTnJl n+AS3Dzw00LYC8wSpKsaaMCedkquOA6SmvjpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958655; x=1702563455; 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=GVh6PC472lZgerr4mfywa9L9+B1rFGAMxmajJY6iaoU=; b=H1Pu5BP0ll+9CxEnyampTxHwc6X+kdpUUJQZkvq9C3/EN/Mer1uMSo9Y5aWyK8Q2yB 6Obbqad/Rtu958ycMdAU8Trsc+6OX4dO20ewVBAwOmmubW3IjyBgfIDerybtQfU82Ssy MHeTMjUH6YQ9rOIB9zM6+3WOWkxqshYD+sNDIhVHfvg1AJI44vtfJ799gRUY5x8vvWVB /wNxpkOkgfiXmAeEQonhfkTlLTggAA9fP67M+821+QXqfKccgl2IWGai1K97KZUow3PI ftEBQrgP4WsU47qm0meqc9lXUpCsiX6emMl3w3Awp944xhPaCeYApKVoN7AOceY/fC/S SFMg== X-Gm-Message-State: AOJu0YzayDHYKqRUl/3zQZt9hPQnMdlzDnEnS5LG0K8QD5etlzxZFutB +JSbBEIbVmKthfQ+Xfw7W/VBnkvSU0Vm4vdx7kkrsA== X-Received: by 2002:a17:907:9705:b0:9e7:d1ab:e90b with SMTP id jg5-20020a170907970500b009e7d1abe90bmr1777303ejc.19.1701958655536; Thu, 07 Dec 2023 06:17:35 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:35 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Sam Ravnborg , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v5 06/10] drm/panel: Add Synaptics R63353 panel driver Date: Thu, 7 Dec 2023 15:16:35 +0100 Message-ID: <20231207141723.108004-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:22:52 -0800 (PST) From: Michael Trimarchi The LS068B3SX02 panel is based on the Synaptics R63353 Controller. Add a driver for it. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- Changes in v5: - Replace a 'return ret' with a 'goto fail' in the r63353_panel_activate() Changes in v4: - Set the reset gpio to low in a single operation - Remove duplicated code for prepare/unprepare callbacks Changes in v2: - Adjust the timings of the panel reset MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-synaptics-r63353.c | 363 ++++++++++++++++++ 4 files changed, 379 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-synaptics-r63353.c diff --git a/MAINTAINERS b/MAINTAINERS index 788be9ab5b73..b82dc141d209 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6874,6 +6874,12 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/ste,mcde.yaml F: drivers/gpu/drm/mcde/ +DRM DRIVER FOR SYNAPTICS R63353 PANELS +M: Michael Trimarchi +S: Maintained +F: Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml +F: drivers/gpu/drm/panel/panel-synaptics-r63353.c + DRM DRIVER FOR TI DLPC3433 MIPI DSI TO DMD BRIDGE M: Jagan Teki S: Maintained diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 99e14dc212ec..d018702be3dc 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -735,6 +735,15 @@ config DRM_PANEL_SITRONIX_ST7789V Say Y here if you want to enable support for the Sitronix ST7789V controller for 240x320 LCD panels +config DRM_PANEL_SYNAPTICS_R63353 + tristate "Synaptics R63353-based panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Synaptics R63353 controller. + config DRM_PANEL_SONY_ACX565AKM tristate "Sony ACX565AKM panel" depends on GPIOLIB && OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index d10c3de51c6d..f267d932c2b5 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -74,6 +74,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS060T1SX01) += panel-sharp-ls060t1sx01.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o +obj-$(CONFIG_DRM_PANEL_SYNAPTICS_R63353) += panel-synaptics-r63353.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o obj-$(CONFIG_DRM_PANEL_SONY_TD4353_JDI) += panel-sony-td4353-jdi.o obj-$(CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521) += panel-sony-tulip-truly-nt35521.o diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c new file mode 100644 index 000000000000..3f61fcdc550b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c @@ -0,0 +1,363 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Synaptics R63353 Controller driver + * + * Copyright (C) 2020 BSH Hausgerate GmbH + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include