Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp522312ybl; Fri, 31 Jan 2020 03:16:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzLcXAXecKjSGaOvpHcg12GRlcOpvdw7yNmZkOhfA9dQ6dfgsdOVRaUXQfJTBXaHoPlph7S X-Received: by 2002:a9d:6386:: with SMTP id w6mr6847077otk.115.1580469393011; Fri, 31 Jan 2020 03:16:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580469393; cv=none; d=google.com; s=arc-20160816; b=LNBjdRt1oXuGdoHhBmSX6pG2N7mg3KN5Kn9pYYrDUzQk48Jh9CRePfRmWo9wnsEU/M 4JonjThTnPZwTOBDpZ5W//xHrkLDRPHSpRehuklz+arAukA/HUkLro0jgD+LFyxt7dUe 1S4A/HBACzLgZ2/JvAkVU+wy/myz2dyyb2EGX9KAhQVYz5a5H+e3lGo1n9ERlHkW5OOi H8ICSaPuNTHNh78AHazDTnMV8Am1me7CRbcLqt85Oqu2bYmAI8+h68T5HyfgKQKm4GqF CsFnfGsXYf0j6X8bQEGkFpcR39a53R/MTKaov04yyjOHIPBuihDwUQcqsxlCMWkv80wL mzUA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=TjGJ1NftSvs3cwiS/cwU0Elwon6VuzHoGrqYjFUfHlo=; b=BEnDIoz6c54cm15B9mim1uWVag+9P4rhpYV2un2xfzx3yyFzRlqABzN+BRukp5c+Ue Uw4j2b9V3vfOHvDTlxuw0Zpq9oBkaFfkfTwMDSlBFgaTnMXTUxfIGrBV9Y0D6yB8WA4r MYN9ZnY4nBKIa5L8QCg9SIbdthvg2bnf/RsAwDjV/QLb0+g85GE1YTJTu6Na4kFphnal vkwigwA5+Zv10k/YA50eTGsXa5Cr7zYrV3etukA9BJ8bH/1PgyO6SSJrCYKVfRALDrGI sg1lyaHmAkJ+ZruV+AsUIFVAbGgPy9WDdzq2k7RhYFVwlOTbz1hQUo/oBWXs+NUtN/Ti AM1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VZmZkAoT; 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; 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 l9si4583520oti.229.2020.01.31.03.16.20; Fri, 31 Jan 2020 03:16:33 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VZmZkAoT; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728409AbgAaLPY (ORCPT + 99 others); Fri, 31 Jan 2020 06:15:24 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:58452 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728268AbgAaLPY (ORCPT ); Fri, 31 Jan 2020 06:15:24 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 00VBF8H6116300; Fri, 31 Jan 2020 05:15:08 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1580469308; bh=TjGJ1NftSvs3cwiS/cwU0Elwon6VuzHoGrqYjFUfHlo=; h=From:To:CC:Subject:Date; b=VZmZkAoTbF9MRPwbHOyOnTEMEvOy3nqEhYxSUjthuA+PXbQpKQn4kMGNWp4o/0rWO xOJnue66jb7Iw7f+rAcynt3EJ2NF43+q0nMIxb+6R94/KQaap2xc7tZ6kbUNWMM03l kUey9/PDRwRhWwfX5Ss6SYffH2dR07Varnm6aYT8= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 00VBF8PJ005715; Fri, 31 Jan 2020 05:15:08 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) 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; Fri, 31 Jan 2020 05:15:08 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE110.ent.ti.com (10.64.6.31) 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; Fri, 31 Jan 2020 05:15:07 -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 00VBF4Ei026862; Fri, 31 Jan 2020 05:15:05 -0600 From: Peter Ujfalusi To: , , , , , CC: , , , , , , Subject: [PATCH v4 0/2] drm/bridge: Support for Toshiba tc358768 RGB to DSI bridge Date: Fri, 31 Jan 2020 13:15:51 +0200 Message-ID: <20200131111553.472-1-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Changes since v3: - bindings/example: Fixed the node name - bindings/example: Added include for GPIO_ACTIVE_LOW and fixed up the gpio binding - driver: Moved the label for goto in tc358768_calc_pll() - driver: Replaced the refcounting of enabled with a simple bool as hw_enable() is only called from one place (tc358768_bridge_pre_enable) - driver: Added Reviewed-by from Andrzej Changes since v2: - Implement pre_enable and post_disbale callbacks and move code from enable and disable callbacks. - hw_enable/disable is removed from tc358768_dsi_host_transfer() - Defines for DSI_CONFW accesses - breakout from the loops (the check for it) is moved one level up in tc358768_calc_pll() Changes since v1: DT bindings document: - Removed MaxItems for the regulators - additionalProperties: false added to port@1 Driver: - Year is now 2020 - Includes shorted - The three letter members of the private struct documented 0 they are named as in the datasheet - Error handling for the IO functions is following what sil-sii8620.c does - regmap regcache is disabled along with refcache_sync() and volatile callback for regmap - The hw enable and disable functions got separated - Taken the suggested simplifactions from Andrzej for tc358768_calc_pll() and tc358768_dsi_host_transfer() - The driver no longer stores the drm_display_mode, it relies on priv->bridge.encoder->crtc->state->adjusted_mode where it needs it - tc358768_calc_pll() can be used for verification only to not modify the state - refcounting added for hw enable state as a dsi transfer was shutting down the bridge when it was already enabled. Tested on top of drm-next + LED backlight patches + DT patches on dra7-evm with osd101t2045 (panel-simple) and osd101t2587 panel drivers. Cover letter from v1: TC358768 is a parallel RGB to MIPI DSI bridge. The initial driver supports MIPI_DSI_MODE_VIDEO, MIPI_DSI_FMT_RGB888 and only write is implemented for mipi_dsi_host_ops.transfer due to lack of hardware where other modes can be tested. Regards, Peter --- Peter Ujfalusi (2): dt-bindings: display: bridge: Add documentation for Toshiba tc358768 drm/bridge: Add tc358768 driver .../display/bridge/toshiba,tc358768.yaml | 159 +++ drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358768.c | 1044 +++++++++++++++++ 4 files changed, 1214 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml 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