From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6984649EC6E for ; Mon, 7 Sep 2026 12:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788784171; cv=none; b=Xk2mv7Nj4aYRxvyJz31dUYoSWev3Hs8Y+wWI3ryStQdasdfkWrjKgD+oOs8Wm1TsgeQXSL9fKWp+V+V1NoXgo+G0oFeSspCDSTbDgfAcv05Y/PArAb4Ovv+PEyhj+WMtb0G0zuOnloKM5EgJGbAUnZK2UkDvnOKw5ZTIKXLa3vQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788784171; c=relaxed/simple; bh=lCSXGrUFCILHzwYYelQ7T+jBC5mSXT+9HiXX3qP/7dM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FMxY6yvPHTNn2CrAmgIWewA1NoR//OnTdeOGHlq+9Id/9bCtFI7XRculO1tZZDet55eRFGBGeyYNabD8XEyJ9rJ7oQvGbB48Yyvf7F7o3dc4LgcwT47NuSm16FwwthOioGepx/s5J0pHk2esTegFlT6B1oPjWGbDKC4W/3mTLXQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CO/RrV5o; arc=none smtp.client-ip=209.85.128.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CO/RrV5o" Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-855c26cf490so22281797b3.0 for ; Mon, 07 Sep 2026 05:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788784164; x=1789388964; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Ca9aMK+HG+jUYl6gtfQJ690ovU7PYTmx4YTI23D+z/M=; b=CO/RrV5o4iJgruUJ2m30YcekhIL2eYqW8hkioykyRE/MypTxO6HaizIHZDdhwB72Xl q8WHdy5WeU+VDX6uqnYgD3YuIcQ9A+8zjTHn/I0gUyqx5csd5GK2pagURe3tDbRtRMLT PPACPrnOhvCE0t8Ifql8q8EBE4F3krNxPKfpHkJA0yszzSSHuok04afBC7oAuzot+2Cs 6wnAyL6d3s+adz5EtFU7m1MrkRvRzpxPbS3ho+MoouCh3VqJ0bWJ89YHCfulDPyIUOya ArpLPWbSg9A6iFWtDazAdKYSAo/JZdqlWq0kkqGNPjK/JfuXwfgboL54vgDNgjZ+801g hbHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788784164; x=1789388964; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Ca9aMK+HG+jUYl6gtfQJ690ovU7PYTmx4YTI23D+z/M=; b=qDUJPzd0TRIb4TFSEdyZ4kTSVxgHce+rwwfDPA7syOs8Q/wujB74dtLIsH2L9OJA5d 6GaNzHV3WVcwu1ucGEG3KhFQTXm7snvHTtn7+YEEx9pPFd313dUI8qp3LuSoef2JBKTl qnRM+SNZw6Dx/Gukwjj8Yk9BmaqPC25iYn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r80434077b3.8.1788784163752; Mon, 07 Sep 2026 05:29:23 -0700 (PDT) Received: from localhost.localdomain ([186.158.238.108]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8714bb0efc1sm70511967b3.45.2026.09.07.05.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2026 05:29:23 -0700 (PDT) From: =?UTF-8?q?Nicol=C3=A1s=20Antinori?= To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: =?UTF-8?q?Nicol=C3=A1s=20Antinori?= , Brigham Campbell , Christophe JAILLET , Jori Koolstra , Shuah Khan , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linux.dev Subject: [PATCH v4 2/3] drm/ch1115: add support for Chipwealth CH1115 OLED controller Date: Mon, 7 Sep 2026 09:23:30 -0300 Message-ID: <98e626a67deffe6573297308d5e7ef9170f7fe41.1788711082.git.nico.antinori.7@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chipwealth CH1115 is a controller for monochrome dot matrix OLED panels. Add DRM support for this chip using i2c bus. Signed-off-by: Nicolás Antinori --- Notes: - Patch series based on 7.3-rc1 drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/chipwealth/Kconfig | 16 + drivers/gpu/drm/chipwealth/Makefile | 3 + drivers/gpu/drm/chipwealth/ch1115-i2c.c | 885 ++++++++++++++++++++++++ 5 files changed, 906 insertions(+) create mode 100644 drivers/gpu/drm/chipwealth/Kconfig create mode 100644 drivers/gpu/drm/chipwealth/Makefile create mode 100644 drivers/gpu/drm/chipwealth/ch1115-i2c.c diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index ba242a8318a8..7aa3ca225434 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -307,6 +307,7 @@ source "drivers/gpu/drm/aspeed/Kconfig" source "drivers/gpu/drm/ast/Kconfig" source "drivers/gpu/drm/atmel-hlcdc/Kconfig" source "drivers/gpu/drm/bridge/Kconfig" +source "drivers/gpu/drm/chipwealth/Kconfig" source "drivers/gpu/drm/etnaviv/Kconfig" source "drivers/gpu/drm/exynos/Kconfig" source "drivers/gpu/drm/fsl-dcu/Kconfig" diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 1e21c2ae8730..1160659aa0bf 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -238,6 +238,7 @@ obj-$(CONFIG_DRM_SPRD) += sprd/ obj-$(CONFIG_DRM_LOONGSON) += loongson/ obj-$(CONFIG_DRM_POWERVR) += imagination/ obj-$(CONFIG_DRM_VERISILICON_DC) += verisilicon/ +obj-y += chipwealth/ # Ensure drm headers are self-contained and pass kernel-doc hdrtest-files := \ diff --git a/drivers/gpu/drm/chipwealth/Kconfig b/drivers/gpu/drm/chipwealth/Kconfig new file mode 100644 index 000000000000..1cc5adc1e28e --- /dev/null +++ b/drivers/gpu/drm/chipwealth/Kconfig @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-only +config DRM_CH1115_I2C + tristate "DRM support for Ch1115 OLED panels (I2C BUS)" + depends on DRM && I2C + select DRM_CLIENT_SELECTION + select DRM_GEM_SHMEM_HELPER + select DRM_KMS_HELPER + select REGMAP_I2C + select VIDEOMODE_HELPERS + help + Chipwealth CH1115 is a controller for monochrome dot matrix OLED + panels. + + DRM Driver for Ch1115 OLED panels connected via I2C. + + If M is selected the module will be called ch1115-i2c. diff --git a/drivers/gpu/drm/chipwealth/Makefile b/drivers/gpu/drm/chipwealth/Makefile new file mode 100644 index 000000000000..dc915b7d5e93 --- /dev/null +++ b/drivers/gpu/drm/chipwealth/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-only + +obj-$(CONFIG_DRM_CH1115_I2C) += ch1115-i2c.o diff --git a/drivers/gpu/drm/chipwealth/ch1115-i2c.c b/drivers/gpu/drm/chipwealth/ch1115-i2c.c new file mode 100644 index 000000000000..ddcf25d19b5e --- /dev/null +++ b/drivers/gpu/drm/chipwealth/ch1115-i2c.c @@ -0,0 +1,885 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * DRM driver for Ch1115 panels + * + * Copyright (C) 2026 Nicolás Antinori + * + * Datasheet: https://datasheet4u.com/download/1576606/CH1115.html + * + * Based on + * - drivers/gpu/drm/sitronix/st7571-i2c.c + * - drivers/gpu/drm/sitronix/st7571.c + * Copyright (C) 2025 Marcus Folkesson + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include