From patchwork Tue Jul 23 13:37:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 169536 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp8888170ilk; Tue, 23 Jul 2019 06:38:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdNd/PlWJgt+KpssqVfG7fjST0VnSzz9RQOMa6uTuWTc8Cxb1wUEvj9gMwIcAfycXWFXxT X-Received: by 2002:a63:2ec9:: with SMTP id u192mr74965068pgu.16.1563889092825; Tue, 23 Jul 2019 06:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563889092; cv=none; d=google.com; s=arc-20160816; b=OxjFZODyoRCEBdMbnj9uh017e/ahU7LO2O6ByQq86UOHHG5EhqOG2McG2kGAIecbAd 77sD+VTzp7nhT3jo181q251mKm+HZR+FeNUTF0Bhh6MXyz1KnN+5X4KRgEjfHYCLOPkR XPEGEfA4ebSpteb2ccWG25UOQArIJCOBxO4v1iWpMaVTdcP1xsRg/MGFidTahAC8zYX/ p1N3EuxcVkAqDJsscHnUYixnzk9G4j9RITjpJbcPoN3zlFiipCvYjNzwmTTCLFDjqLl+ B+njPVBiIEimFiM34CynOZHz2yHwJX2Z0hpGNRpK/oh7ZEnLHjQQOcd/8YIf4KEcB8Y4 DchA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=KK0sUHSx9tFlrTp/2yVHHJuBnNMJNHsfjvCkc6GN2Z8=; b=U011GsZ/mzFFD1oMffhInD6nrfQ5bDoB40ktEi3pPByHGgYpZF1i1U1g5fQQTbR0ig ab8qcGBIeDYME3ZcJloyaP7y6ADdD5v0qv9QutJBX4yAZ++5oc6wWUu6psZLtW7lqZCz g7GXebyr6tJeuJ+35jzx+KzNaDIT3mWP0BZdx8uZu22juXIN2eLysHus6q1xDZz4oRfk PwJ5eX+pvJG3ha7+xvRvr6hROgVkxktudHmPAkSL57tFn7hN/ePoLywxmSJrHhDNwWYH CYZwt69XHlg3muSkn0OUc/nyrM6RagSXFQElVkfrx3U/1iH7KF84vYE09ACSEqVrsNKC jw8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id g15si11718813pfb.137.2019.07.23.06.38.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jul 2019 06:38:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A20756E28A; Tue, 23 Jul 2019 13:38:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 39D806E228 for ; Tue, 23 Jul 2019 13:38:08 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id p17so41090735ljg.1 for ; Tue, 23 Jul 2019 06:38:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1WIz4398NalYoE1dkIhu0zv1BVloq81pBzlO+qRIk2I=; b=dY0z3i5hJrcy2gtAuo1wMA49TfAmQogglkE5odE0lJ6nerVYMtzhMc2F4omd9+EOa6 opcFPk5RSH7pKjlQWU2EqjRZhmDJqU2UKXxXVriEyTNajuqT/3feFY4sU3h8gcnWoJgc ks97jgtIjj/pW2jHfxMlN4tNWGWWZm+i0ESVrFRx0xNNg2xWKNwNdUtAZMHeHLt6x6uJ cgK97ldht5/WLisfNOqfD5KyCEf++bE/puFIq3XgAqxUa5GgEgxpHn2OV3w0LxNMvzTj JvEnajWPYEjbVbwm4T4SdRbmjuAocXT3a66MZtdabV4NvtA1WCm77wGibwzQ/s5FFkAJ ccsA== X-Gm-Message-State: APjAAAXbnI+kLQnI0TEDjCWfKZmMBZGRoErB+BKU2/TX8MtW3MgGkSYo cCtOTiptkX0Wo8V8MKAUQ/fmhLPyiOM= X-Received: by 2002:a2e:89d0:: with SMTP id c16mr38667121ljk.219.1563889086687; Tue, 23 Jul 2019 06:38:06 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id l24sm8069411lji.78.2019.07.23.06.38.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 06:38:05 -0700 (PDT) From: Linus Walleij To: Daniel Tang , Fabian Vogt Subject: [PATCH 2/3] RTF: drm/panel: simple: Add TI nspire panels Date: Tue, 23 Jul 2019 15:37:54 +0200 Message-Id: <20190723133755.22677-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190723133755.22677-1-linus.walleij@linaro.org> References: <20190723133755.22677-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1WIz4398NalYoE1dkIhu0zv1BVloq81pBzlO+qRIk2I=; b=OuhS0VSszSa/G+X8Vg8wOX4jN8ZWDZS3HVget6W39BC0v6+nDLYNJ/IDrryN+4galP +LkZx4gw2vFzAHOuHz0XjiUHQV4UuFrYsPtsbQaAySmaNwqImGY8tYZIhAe4niKTC2Ja h1bGtbWp6EobD7I1no/m/iXS2qreA0g/ulZHFm6vhBJU+1jLVzEFFpbsssimk4DQEP3u +Oq3lV/DRdwM/3ABEguM0ZOB9oNgo3RKUKtyRgRGUu8RZYCA1hGMNeDL4YP2pAtXNIie VedCUoWMNl9E1LyRy9RH/I2hNhkfiXCC+HHLFHR86yN6NB7cijvL/l4GimVJsD2hR0w8 nf9Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This adds support for the TI nspire panels to the simple panel roster. This code is based on arch/arm/mach-nspire/clcd.c. This includes likely the first grayscale panel supported. These panels will be used with the PL11x DRM driver. Cc: Daniel Tang Cc: Fabian Vogt Signed-off-by: Linus Walleij --- drivers/gpu/drm/panel/panel-simple.c | 63 ++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 5a93c4edf1e4..e5cfe1398a3b 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -2761,6 +2761,63 @@ static const struct panel_desc arm_rtsm = { .bus_format = MEDIA_BUS_FMT_RGB888_1X24, }; +static const struct drm_display_mode nspire_cx_lcd_mode[] = { + { + .clock = 1000, + .hdisplay = 320, + .hsync_start = 320 + 50, + .hsync_end = 320 + 50 + 6, + .htotal = 320 + 50 + 6 + 38, + .vdisplay = 240, + .vsync_start = 240 + 3, + .vsync_end = 240 + 3 + 1, + .vtotal = 240 + 3 + 1 + 17, + .vrefresh = 60, + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, + }, +}; + +static const struct panel_desc nspire_cx_lcd_panel = { + .modes = nspire_cx_lcd_mode, + .num_modes = 1, + .bpc = 8, + .size = { + .width = 65, + .height = 49, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24, + .bus_flags = DRM_BUS_FLAG_PIXDATA_NEGEDGE, +}; + +static const struct drm_display_mode nspire_classic_lcd_mode[] = { + { + .clock = 1000, + .hdisplay = 320, + .hsync_start = 320 + 6, + .hsync_end = 320 + 6 + 6, + .htotal = 320 + 6 + 6 + 6, + .vdisplay = 240, + .vsync_start = 240 + 0, + .vsync_end = 240 + 0 + 1, + .vtotal = 240 + 0 + 1 + 0, + .vrefresh = 60, + .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, + }, +}; + +static const struct panel_desc nspire_classic_lcd_panel = { + .modes = nspire_classic_lcd_mode, + .num_modes = 1, + /* The grayscale panel has 8 bit for the color .. Y (black) */ + .bpc = 8, + .size = { + .width = 71, + .height = 53, + }, + /* This is the grayscale bus format */ + .bus_format = MEDIA_BUS_FMT_Y8_1X8, +}; + static const struct of_device_id platform_of_match[] = { { .compatible = "ampire,am-480272h3tmqw-t01h", @@ -2966,6 +3023,12 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "nlt,nl192108ac18-02d", .data = &nlt_nl192108ac18_02d, + }, { + .compatible = "ti,nspire-cx-lcd-panel", + .data = &nspire_cx_lcd_panel, + }, { + .compatible = "ti,nspire-classic-lcd-panel", + .data = &nspire_classic_lcd_panel, }, { .compatible = "nvd,9128", .data = &nvd_9128,