From patchwork Mon Nov 23 14:33:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 11925439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47270C2D0E4 for ; Mon, 23 Nov 2020 14:34:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81E8120773 for ; Mon, 23 Nov 2020 14:34:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="ebqRsCRR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81E8120773 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B626889EFF; Mon, 23 Nov 2020 14:34:10 +0000 (UTC) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 37C9289EFF for ; Mon, 23 Nov 2020 14:34:09 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id p8so18819656wrx.5 for ; Mon, 23 Nov 2020 06:34:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TzQ+MW1sRozBpQLbt6oHDRl3TR3+0qJeZOJ2PqKNVPw=; b=ebqRsCRRJtSqC0s8ZL2x/5Y5ZYIzJbs6cCAuKXzUsIQQ0yhEmJAMtzifwtORq7Bh52 vFrpZXjEbkT6cESUTBbw2j+xoobJBL7lS1on/hkz0JxU8wK1PxEtM7dazwFXPlXY4Pwz rW0m4PXhi2ZXqijZ0tCzI8ZGmiuM7sCMUzKVOwj3eeejmNwHP/8ASIg5m2TZt9I9OYSL okHUwxQczORqPLyDiEHRFg9muHtwPFIzgRyL/H2NB9AP2t1ovyDkpIu/kMIUHRfs48Vs UJ+7qOMSaGx7kNeHqtnc3+Auz7R/8YxLiiYK7jb3e1zuv6plSnLjulgb5Yl5VjfWQmO8 QQCw== 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=TzQ+MW1sRozBpQLbt6oHDRl3TR3+0qJeZOJ2PqKNVPw=; b=kxkbbfYo28EPKEy7v6oWj7VbmLUfzpNuHyKkS4VF1Ac0w/xgI8zaLQ0mmIY+wMKK90 fF/oQGXzI8CN9V9nTUpPVideBuNZcmZMfPORmarj+4ocXptg/IxEVX4OmQHO2ruUxe8e l4vmFjyhs1/v+nfK1woy+T8bmXg6tYstz1EGOQGV83nXNt94LAKE7qCu858NmcO3E9OH y5XoxLn65EyBPyS1kvsi3C2Tz6xd1FnBxlXhaq4khuHeKCECkGE8pxwJlEpp8BpG7PUu CHwudP3pyd215ngMQVx+N5so+ocrU3rgqVFVoUOkqBre5UQKxE3KwW+aIGt6hzYOMRR4 /xWw== X-Gm-Message-State: AOAM532JI8Z4UXxpxVvLJv8qreKbeIyneycFiUiXZRT02Jg/dT8QXviP dXj3hQaQrNXROoacdTKNVVEn/lnyR9Dk9kRi X-Google-Smtp-Source: ABdhPJwehKyk0RMzN+JwyVjbkvxBf9siWp85cfodX5MrKLYB3qY3Up0iA83EJiLEjiVbMg4MOy6T9A== X-Received: by 2002:adf:c147:: with SMTP id w7mr33954942wre.60.1606142047701; Mon, 23 Nov 2020 06:34:07 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:2ec0:82b0:9541:d2fd:3a68:67ae]) by smtp.gmail.com with ESMTPSA id h2sm18126723wme.45.2020.11.23.06.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 06:34:07 -0800 (PST) From: Neil Armstrong To: sam@ravnborg.org Subject: [PATCH 1/2] dt-bindings: panel-simple-dsi: add Khadas TS050 panel bindings Date: Mon, 23 Nov 2020 15:33:53 +0100 Message-Id: <20201123143354.295844-2-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201123143354.295844-1-narmstrong@baylibre.com> References: <20201123143354.295844-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Neil Armstrong Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This add the bindings for the Khadas TS050 1080x1920 5" LCD DSI panel designed to work with the Khadas Edge-V, Captain, VIM3 and VIM3L Single Board Computers. Signed-off-by: Neil Armstrong Reviewed-by: Sam Ravnborg --- .../devicetree/bindings/display/panel/panel-simple-dsi.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml index 72e4b6d4d5e1..fbd71669248f 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml @@ -35,6 +35,8 @@ properties: - boe,tv080wum-nl0 # Innolux P079ZCA 7.85" 768x1024 TFT LCD panel - innolux,p079zca + # Khadas TS050 5" 1080x1920 LCD panel + - khadas,ts050 # Kingdisplay KD097D04 9.7" 1536x2048 TFT LCD panel - kingdisplay,kd097d04 # LG ACX467AKM-7 4.95" 1080×1920 LCD Panel From patchwork Mon Nov 23 14:33:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 11925441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4DBAC2D0E4 for ; Mon, 23 Nov 2020 14:34:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 695BD20773 for ; Mon, 23 Nov 2020 14:34:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="sMPr04Ey" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 695BD20773 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F8DB89FDD; Mon, 23 Nov 2020 14:34:15 +0000 (UTC) Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 00FF189F8B for ; Mon, 23 Nov 2020 14:34:10 +0000 (UTC) Received: by mail-wr1-x42d.google.com with SMTP id l1so18780542wrb.9 for ; Mon, 23 Nov 2020 06:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N1gL9iG9VNNQODcQ4bqy/3MjLCHTiEErerOPbbpGmaw=; b=sMPr04EyF5S8Qx34VNvHLBDDSBvG1qC05Pf8Ln7nmActrfePfdMJSshFZg2Eb5K0eQ cgRpHdi+7tRLYIy/fkIT+0BTZsQbbEyqRL2cpMJwNA0t/hrWKnYIkRVB4SGTAWGeZ9ke ic0EBZLMGim01KZYdtH3os5CGnJ06nAo+a7xGSL2QqMRAfgj4XUVCaWxnVOIAfJkEn+1 Q9U3nsCbe5HvrjLTev0xTQK4ECRq68nq9ZfD717hEBy8elFsLYw08DkE+QL+RKVqOYtm yyEwQ6FeWnN9On+OK6hwnKF3SSTp2YVONb+151iL2pIpLi5+CwChggCUc6xySf2qMVUl jyUg== 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=N1gL9iG9VNNQODcQ4bqy/3MjLCHTiEErerOPbbpGmaw=; b=TpTXUs7gJOYlSp29Jv1zZ6qNzQdiEq/bfQsd2HYx1fHz9A69pvdNQtmFVxf1FMs9Wt 5em3kMcCrAk2g5nN5H7OF2ZfLFgDODYfzUmqWhNbB0CV+AtTPpxgYEhQd4QBufnATkKq skAiJj0/jO6VYjYCWEgZc0lb8AfR5YfslA7gSFpH+vUVHHZPnYQDSZ2niXczx0qEWslb 9EWjUbkJxZMIUGDdOO86IoVHgYDTIpiv7boQrdTTELlKXkk+/V3PamZwsRDxrazuyoQ0 QslLVFdRTl/0kQ2JyfVqfAu5eE+px01mi1GaSQ32G7gAG0kO0cpQmbk+9QuTldCxOy23 mDlQ== X-Gm-Message-State: AOAM5312Sdm55jQb1JsrIjWG2o5Q20pktqLzQG6VRJAjIbT5gogysnpo vIkJgPxe8q4IOj/ZWWne76VXlg== X-Google-Smtp-Source: ABdhPJxihrxawGEH0Ao7tnStlBwVolzE1Ui5ROmtavEmsY4HvTT5ctYDAl/EWAkxb53Qe1bkxa1Uww== X-Received: by 2002:adf:fe48:: with SMTP id m8mr7959840wrs.89.1606142049297; Mon, 23 Nov 2020 06:34:09 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:2ec0:82b0:9541:d2fd:3a68:67ae]) by smtp.gmail.com with ESMTPSA id h2sm18126723wme.45.2020.11.23.06.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 06:34:08 -0800 (PST) From: Neil Armstrong To: sam@ravnborg.org Subject: [PATCH 2/2] drm: panel: add Khadas TS050 panel driver Date: Mon, 23 Nov 2020 15:33:54 +0100 Message-Id: <20201123143354.295844-3-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201123143354.295844-1-narmstrong@baylibre.com> References: <20201123143354.295844-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Neil Armstrong Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This add support for the Khadas TS050 1080x1920 5" LCD DSI panel designed to work with the Khadas Edge-V, Captain, VIM3 and VIM3L Single Board Computers. It provides a MIPI DSI interface to the host, a built-in LED backlight and touch controller. The init values was taken from the vendor source tree, comments were added to the know values but most of the init table is undocumented. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-khadas-ts050.c | 876 +++++++++++++++++++++ 3 files changed, 888 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-khadas-ts050.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index b4e021ea30f9..8fec45b2ce02 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -145,6 +145,17 @@ config DRM_PANEL_JDI_LT070ME05000 The panel has a 1200(RGB)×1920 (WUXGA) resolution and uses 24 bit per pixel. +config DRM_PANEL_KHADAS_TS050 + tristate "Khadas TS050 panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Khadas TS050 TFT-LCD + panel module. The panel has a 1080x1920 resolution and uses + 24 bit RGB per pixel. It provides a MIPI DSI interface to + the host, a built-in LED backlight and touch controller. + config DRM_PANEL_KINGDISPLAY_KD097D04 tristate "Kingdisplay kd097d04 panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index ebbf488c7eac..03496695e03f 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o +obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o diff --git a/drivers/gpu/drm/panel/panel-khadas-ts050.c b/drivers/gpu/drm/panel/panel-khadas-ts050.c new file mode 100644 index 000000000000..856fcad69306 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-khadas-ts050.c @@ -0,0 +1,876 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2020 BayLibre, SAS + * Author: Neil Armstrong + */ + +#include +#include +#include +#include +#include + +#include