Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6439261ybl; Wed, 15 Jan 2020 04:47:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyIgwB1HT4N1S20Y4Oj3338xW4GP8KcO7zcXjx2HyZriGWsO9qW7wT0gG6WiFpz1YHJIVh9 X-Received: by 2002:a9d:6c06:: with SMTP id f6mr2660191otq.318.1579092433521; Wed, 15 Jan 2020 04:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579092433; cv=none; d=google.com; s=arc-20160816; b=ND5L+J6SAgvLvHv6xlv/CtGk9gcF7dRCueY2zXOMj2p4cdMMM9amgntqlRAZltlRmc 5yoWr1zEpRKHGD/wPFb9g162jtL1IIPfRorhwcA8ytrUHxy+s04nBbsOOkDMwNLmo7sU Sxk2F03pl1sZ4X/Prxe9Mw7PjOoXKLPamGgqUyljLu3Gvi4jlgFi0QtYjKZH18DetuWi 3I2ljRyo0+tikslkbPeGWU6K8fJ5fe/zlbdrHwHhQ8fJFOoE/sfpfjs+mAYqpWGK/mUE qQVOn2dl2/0XO3nR/ON0UA7i7e/kqdcej3F7W7zncq8B5MQcGkvMCGAZDTumFFR1r3b2 1u5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=tRUEv2W6W88gIBsTbaunQ9Gto+jg7WMXlPItiLvByTM=; b=lLDNxIPNPPOsMPIqsxznohiaqVDwRdF7pRtdQFLVGviUa5BlsojPmAz7um4h0n8M5C D6RYucrXPlSkVIyR02TPBwBLy6q6csGdVFd9JCG3L/i3aFTZX/iWwdE6HWOcE4NxiadZ NJEpL4Dd7snm5ClsctbIBYF9JI1NH6qBgyivIfwahafK6AoInYWIHsIC+lqz48YI725s B2C5/kEt/pbpvJc12P9Mo+G0k0vH9BWmtSidfY67Wzid4sSRdI574LD1v4eoU//zwFB9 IkOUBGYz2OE3qFLux4QY94fRmSR3lBhUDQwk7tpy+hxMGw+8iKwBxJyBS2RLgXKbOUAn f/xQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si10847132otp.257.2020.01.15.04.47.00; Wed, 15 Jan 2020 04:47:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729208AbgAOMqB (ORCPT + 99 others); Wed, 15 Jan 2020 07:46:01 -0500 Received: from michel.telenet-ops.be ([195.130.137.88]:54954 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729151AbgAOMqA (ORCPT ); Wed, 15 Jan 2020 07:46:00 -0500 Received: from ramsan ([84.195.182.253]) by michel.telenet-ops.be with bizsmtp id qclq2100M5USYZQ06clqYB; Wed, 15 Jan 2020 13:45:58 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iri3S-0003z9-68; Wed, 15 Jan 2020 13:45:50 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iri3S-00012k-4a; Wed, 15 Jan 2020 13:45:50 +0100 From: Geert Uytterhoeven To: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , David Lechner , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Rob Herring , Mark Rutland Cc: Sam Ravnborg , Chris Brandt , Kieran Bingham , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2 5/5] drm: tiny: st7735r: Add support for Okaya RH128128T Date: Wed, 15 Jan 2020 13:45:48 +0100 Message-Id: <20200115124548.3951-6-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200115124548.3951-1-geert+renesas@glider.be> References: <20200115124548.3951-1-geert+renesas@glider.be> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for the Okaya RH128128T display to the st7735r driver on DT-enabled systems. The RH128128T is a 128x128 1.44" TFT display driven by a Sitronix ST7715R TFT Controller/Driver. The latter is very similar to the ST7735R, and can be handled by the existing st7735r driver. Signed-off-by: Geert Uytterhoeven --- v2: - Split in two patches, - Update Kconfig help text, - Improve file comment header. --- drivers/gpu/drm/tiny/Kconfig | 8 +++++--- drivers/gpu/drm/tiny/st7735r.c | 9 ++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig index a46ac284dd5e9211..a8664211123e7025 100644 --- a/drivers/gpu/drm/tiny/Kconfig +++ b/drivers/gpu/drm/tiny/Kconfig @@ -85,14 +85,16 @@ config TINYDRM_ST7586 If M is selected the module will be called st7586. config TINYDRM_ST7735R - tristate "DRM support for Sitronix ST7735R display panels" + tristate "DRM support for Sitronix ST7715R/ST7735R display panels" depends on DRM && SPI select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DRM_MIPI_DBI select BACKLIGHT_CLASS_DEVICE help - DRM driver Sitronix ST7735R with one of the following LCDs: - * JD-T18003-T01 1.8" 128x160 TFT + DRM driver for Sitronix ST7715R/ST7735R with one of the following + LCDs: + * Jianda JD-T18003-T01 1.8" 128x160 TFT + * Okaya RH128128T 1.44" 128x128 TFT If M is selected the module will be called st7735r. diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c index a838f237c8d82e3d..32574f1b60716390 100644 --- a/drivers/gpu/drm/tiny/st7735r.c +++ b/drivers/gpu/drm/tiny/st7735r.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * DRM driver for Sitronix ST7735R panels + * DRM driver for display panels connected to a Sitronix ST7715R or ST7735R + * display controller in SPI mode. * * Copyright 2017 David Lechner * Copyright (C) 2019 Glider bvba @@ -144,6 +145,11 @@ static const struct st7735r_cfg jd_t18003_t01_cfg = { .write_only = true, }; +static const struct st7735r_cfg rh128128t_cfg = { + .mode = { DRM_SIMPLE_MODE(128, 128, 25, 26) }, + .left_offset = 2, + .top_offset = 3, + .rgb = true, }; DEFINE_DRM_GEM_CMA_FOPS(st7735r_fops); @@ -163,6 +169,7 @@ static struct drm_driver st7735r_driver = { static const struct of_device_id st7735r_of_match[] = { { .compatible = "jianda,jd-t18003-t01", .data = &jd_t18003_t01_cfg }, + { .compatible = "okaya,rh128128t", .data = &rh128128t_cfg }, { }, }; MODULE_DEVICE_TABLE(of, st7735r_of_match); -- 2.17.1