From patchwork Tue Dec 17 10:15:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181848 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5533646ile; Tue, 17 Dec 2019 02:15:19 -0800 (PST) X-Google-Smtp-Source: APXvYqyRxZbnL0DJtQZm8Lq+Gnbxyb7aqeqJ1woXfz6SpXrGwTcggLIgCs294h2WCP++I33QLnT5 X-Received: by 2002:a05:6830:12d0:: with SMTP id a16mr37622190otq.8.1576577718933; Tue, 17 Dec 2019 02:15:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576577718; cv=none; d=google.com; s=arc-20160816; b=ZKCssT5ke6tvOqp+UwePzoAk+dFpSHyjCMNPsouMKh0KsoHsDpUarYsWr3Lg0p0ygn F5dyvG7gy7xRj0QrVWu2Vo/tt7NhD+yDvWerAu1+wo6DtCzb4hN7TK7WyYddFrzWv1yV nfrcu4ZlqNOQrQWjCQZ+jLeb0sIn1B5+LhaGvFjVyjmMEseqsgmSnLySRWcmY/Uhz1us BO6GUu0RCGs1vtalmrEWXE+6TyF44D5RZkPmX8BMgXuIjpWXRUCnWoqnE2mjWA7bU4To E2GO71uETFP2ojs5Org9Q2XiDJtkIF/NcDB4MWYc5Ky5RSSwGGgW2ovqddKuMnugnJqE m7JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AV3n4D7OW697OVEJOikpliUe5lRMix0otCgs5kGkoe0=; b=jlcu4gP4rjAjl9Sfv7etLyROOVbnyk3eGyYLZyQDNr2ufgIKweJWJPpdtC211XQsDy nzRA9x0k2h2UYbZcw0r2X6HUUg/CY4kKHbzssoUtzP3C6azL0k1z9MFwbv7iRqJh26Ix bDSbBZbo7ElYGjsA28PPLmasAoMdcDnkQpyAhBGLkXain/+ruvnZO86aVXdvgbKIRa4K EHbqX8rLwtpaMmupeq8byR4Fb/GjVmVnc6iDr4tb8yKu0on9kuJUb3q5BWxR/oFk4fqY m0Y11yG3mgIy9YYsbVqeOBhVsqj0xCVONSN3J7/RPK/jm+OtPM2G5iS7iDOZoYXaJLq4 6Rzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=H4hoUqi5; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si12012807otr.288.2019.12.17.02.15.18; Tue, 17 Dec 2019 02:15:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=H4hoUqi5; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727498AbfLQKPS (ORCPT + 8 others); Tue, 17 Dec 2019 05:15:18 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:57698 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727412AbfLQKPS (ORCPT ); Tue, 17 Dec 2019 05:15:18 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBHAEwc2105315; Tue, 17 Dec 2019 04:14:58 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576577698; bh=AV3n4D7OW697OVEJOikpliUe5lRMix0otCgs5kGkoe0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=H4hoUqi5WhynFvYI57xTOmPg3XfJ9lJKMvWgbrjwSSnh+Ed47ffeojcmNgNdSSgef 91DoIEk45geXrqq/E7phSZN9TZGkHXlN/1GhxyDbXKrFKwlx+m0iTXYR+ZVLUYAkY5 iz+Muj6Vq2aCXfPb+xBXnbaH0nSGek3a5Jn/3VqY= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBHAEw9n092966 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2019 04:14:58 -0600 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 17 Dec 2019 04:14:58 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 17 Dec 2019 04:14:58 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBHAEp6N086932; Tue, 17 Dec 2019 04:14:55 -0600 From: Peter Ujfalusi To: , , , , , CC: , , , , , , Subject: [PATCH 1/2] dt-bindings: display: bridge: Add documentation for Toshiba tc358768 Date: Tue, 17 Dec 2019 12:15:05 +0200 Message-ID: <20191217101506.18910-2-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191217101506.18910-1-peter.ujfalusi@ti.com> References: <20191217101506.18910-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org TC358768/TC358778 is a Parallel RGB to MIPI DSI bridge. Signed-off-by: Peter Ujfalusi --- .../display/bridge/toshiba,tc358768.yaml | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml new file mode 100644 index 000000000000..8f96867caca0 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml @@ -0,0 +1,158 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/toshiba,tc358768.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Toschiba TC358768/TC358778 Parallel RGB to MIPI DSI bridge + +maintainers: + - Peter Ujfalusi + +description: | + The TC358768/TC358778 is bridge device which converts RGB to DSI. + +properties: + compatible: + enum: + - toshiba,tc358768 + - toshiba,tc358778 + + reg: + maxItems: 1 + description: base I2C address of the device + + reset-gpios: + maxItems: 1 + description: GPIO connected to active low RESX pin + + vddc-supply: + maxItems: 1 + description: Regulator for 1.2V internal core power. + + vddmipi-supply: + maxItems: 1 + description: Regulator for 1.2V for the MIPI. + + vddio-supply: + maxItems: 1 + description: Regulator for 1.8V - 3.3V IO power. + clocks: + maxItems: 1 + + clock-names: + const: refclk + + ports: + type: object + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + port@0: + type: object + additionalProperties: false + + description: | + Video port for RGB input + + properties: + reg: + const: 0 + + patternProperties: + endpoint: + type: object + additionalProperties: false + + properties: + data-lines: + enum: [ 16, 18, 24 ] + + remote-endpoint: true + + required: + - reg + + port@1: + type: object + description: | + Video port for DSI output (panel or connector). + + properties: + reg: + const: 1 + + patternProperties: + endpoint: + type: object + additionalProperties: false + + properties: + remote-endpoint: true + + required: + - reg + + required: + - "#address-cells" + - "#size-cells" + - port@0 + - port@1 + +required: + - compatible + - reg + - vddc-supply + - vddmipi-supply + - vddio-supply + - ports + +additionalProperties: false + +examples: + - | + i2c1 { + #address-cells = <1>; + #size-cells = <0>; + + dsi_bridge: tc358768@0e { + compatible = "toshiba,tc358768"; + reg = <0x0e>; + + clocks = <&tc358768_refclk>; + clock-names = "refclk"; + + /* GPIO line is inverted before going to the bridge */ + reset-gpios = <&pcf_display_board 0 1 /* GPIO_ACTIVE_LOW */>; + + vddc-supply = <&v1_2d>; + vddmipi-supply = <&v1_2d>; + vddio-supply = <&v3_3d>; + + dsi_bridge_ports: ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + rgb_in: endpoint { + remote-endpoint = <&dpi_out>; + data-lines = <24>; + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + remote-endpoint = <&lcd_in>; + }; + }; + }; + }; + }; + From patchwork Tue Dec 17 10:15:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181849 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5533748ile; Tue, 17 Dec 2019 02:15:25 -0800 (PST) X-Google-Smtp-Source: APXvYqyAkb7wkYUdfEMIMYx3GLmd5pww6Cfs8l8UlJVQmZbot0dLjN/lMZyH1sqyaT/fxwJ1qEYa X-Received: by 2002:a9d:7b4e:: with SMTP id f14mr37823885oto.355.1576577724994; Tue, 17 Dec 2019 02:15:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576577724; cv=none; d=google.com; s=arc-20160816; b=kgD8ebwKZuDiVVzvLOnt/0j9Z3Iu5UQXSBKpUYWXrgETSZQgmMmtiQaRMiXF1HoSQn iJCWKme1bITXvX9f1PF7WPx5EE4vr4JbgVa5btUAJ9hj4+dDZavgIVs14KB/Oghc8WMX amY2UmuAit/9DleCLqpok3hH1aChOAjA4VWMPTd0nvPihLP00kmfxQh5Kl4GNItev8Pn 35KEngRmMz+xmGC5/e+NrkR1jHjAjSVPxRoY8az/g0pb9G6hQ1zo2aIao4uLSAKXSnd5 YscEtAxNHf2/xqXmO7QKCCcyOHNOBAXm8vJWQO7aCS/lB2m+RJgbisF6ateXcLQumBIj RSww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IKgKf0e2WWBZqvTOXlRN7ncsEfzWHuPQDZ6DYhh2BP0=; b=RE7I/oYnckoZqrPW6TANvmbh0e3Nv5zT4TuaLiiz76u2+MOmqWBG9VCL98Lh7j5XCM hPH+J9VpSuVu6ZiU9c6q7zY8w5XyNnw653x4ETb35H8Wl29qo+yLSzqRvDGIDIj7s+py dhRXdCmNz5GIYrcQwAqj11FcAZHNvJE9J0ZaPI2E5lJo4Ok8Y+v5e0cSCpokVchuuVX7 I5YZwxVtJm1bGzbfYCf3LTg7WQLkAybYdCVSnQGK0ymsEvSq+GkFVwlONKeZCP61r9u+ J1FTQq6TDHYN07F1uN3aFTGztUaPnj/E3CXN4ikjGQf/tltKYlOgMewFxYMAwO1XqqKM CJeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OZ9m5Mv4; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p26si12770808oto.240.2019.12.17.02.15.24; Tue, 17 Dec 2019 02:15:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OZ9m5Mv4; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727517AbfLQKPY (ORCPT + 8 others); Tue, 17 Dec 2019 05:15:24 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:46416 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727412AbfLQKPY (ORCPT ); Tue, 17 Dec 2019 05:15:24 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBHAF2xI069775; Tue, 17 Dec 2019 04:15:02 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576577702; bh=IKgKf0e2WWBZqvTOXlRN7ncsEfzWHuPQDZ6DYhh2BP0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OZ9m5Mv4SEHnUf5ou93kP4oneQSnvt4xoh2Mm/wejmKjxs7ywhIgfW7urrMYkGGas vIvWFygEIhjoHLVQ271wCs/RHwg0HONa66RbxzZM9MGBoLJ42vdUujVE8b/t70UsmA aWsGeYMxAsOK2hIESrbiA+t624cxQ8ArO9iFXecY= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBHAF2Sa093086 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2019 04:15:02 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 17 Dec 2019 04:15:01 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 17 Dec 2019 04:15:01 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBHAEp6O086932; Tue, 17 Dec 2019 04:14:58 -0600 From: Peter Ujfalusi To: , , , , , CC: , , , , , , Subject: [PATCH 2/2] drm/bridge: Add tc358768 driver Date: Tue, 17 Dec 2019 12:15:06 +0200 Message-ID: <20191217101506.18910-3-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191217101506.18910-1-peter.ujfalusi@ti.com> References: <20191217101506.18910-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add basic support for the Toshiba TC358768 RGB to DSI bridge. Not all the features of the TC358768 is implemented by the initial driver: MIPI_DSI_MODE_VIDEO and MIPI_DSI_FMT_RGB888 is only supported and tested. Only write is implemented for mipi_dsi_host_ops.transfer. Signed-off-by: Peter Ujfalusi --- drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358768.c | 963 ++++++++++++++++++++++++++++++ 3 files changed, 974 insertions(+) create mode 100644 drivers/gpu/drm/bridge/tc358768.c -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index ccc698c44f58..fd65666702e1 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -122,6 +122,16 @@ config DRM_TOSHIBA_TC358767 ---help--- Toshiba TC358767 eDP bridge chip driver. +config DRM_TOSHIBA_TC358768 + tristate "Toshiba TC358768 MIPI DSI bridge" + depends on OF + select DRM_KMS_HELPER + select REGMAP_I2C + select DRM_PANEL + select DRM_MIPI_DSI + help + Toshiba TC358768AXBG/TC358778XBG DSI bridge chip driver. + config DRM_TI_TFP410 tristate "TI TFP410 DVI/HDMI bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index a6c7dd7727ea..204696e30572 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_DRM_SII9234) += sii9234.o obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o obj-$(CONFIG_DRM_TOSHIBA_TC358764) += tc358764.o obj-$(CONFIG_DRM_TOSHIBA_TC358767) += tc358767.o +obj-$(CONFIG_DRM_TOSHIBA_TC358768) += tc358768.o obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c new file mode 100644 index 000000000000..63571191b1c4 --- /dev/null +++ b/drivers/gpu/drm/bridge/tc358768.c @@ -0,0 +1,963 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com + * Author: Peter Ujfalusi + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include