Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1226970ybx; Thu, 31 Oct 2019 07:30:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyy22V+kgHbvpbfkQZ6eYZlRzyqprOE8bae6tQL19MRbbdcL0BxrsfMdcgDpDV8kX1gsN1X X-Received: by 2002:aa7:dd87:: with SMTP id g7mr3704791edv.295.1572532223955; Thu, 31 Oct 2019 07:30:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572532223; cv=none; d=google.com; s=arc-20160816; b=tCUCdO2V3wfA8QHLd/9NxpeXcFAhieLU8wOQCzRa1K4rlVCyVFEYPKqSV8/mMJe54M Ibl6U48MvE5I1JvxbjLLYDWrndSbXZmTuIu+Iv6YtjnIrgfbKSgtCsCYHFcjF9N7E3zb 8dMPwTjF3junY7n9ARRz3XpLZ7JfyKn1T6qihrgBS8qJpQ2RfZTTJbn9rJav+NwBVsXh WZhq+2yMEtZqsO0ACPilBxWcRBhS5aqiIi4V6auVkRZkr1jq2eQg6agPRzJFD5H+BXl4 XCc5WZzmcQUqnjjT5c5PIU/s99K0qKGIjuZJ0fqlcyKWIvNUPV0BH9y86u+VhIVoul+a hNnQ== 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; bh=fhFewdYr2BVyM9/Fys6VE/cOqMkk5hloeq0AtaTA5AM=; b=toz57Gk6xPGmM+3RyhPgjVeEo3LWU3GdMR0yRmiztM1mGlrhaT7l7U3wVkcLWW5GJ9 sB9QWkbphz+ohzTQhkQTZdTU4EkzXvf0rJp8RrKDXnvhL4rbNZ4apgYu3NS8rsKLiZlv L5aGWHa+3ElzfSDcuaJjNFLFBWPHMSdIfx2pP/t62y4QAU2pMKaO5yoCo8YSNVWzXliV XnGu8z/Dt/wqXqxNI4AyH9FnxWMEfJ3bDBH0ITNgaTw4M6iXXUCS9q6qOXLCsHW9KA9E E5FhvfiUFMaN13M+JxG4A7D6YcOpkAxftFwRWsz6Zcy7mjqYE0DeBW31bCga4DgM7Rw7 ekEw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f45si4269394ede.381.2019.10.31.07.30.00; Thu, 31 Oct 2019 07:30:23 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728200AbfJaO0X (ORCPT + 99 others); Thu, 31 Oct 2019 10:26:23 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48904 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727862AbfJaO0W (ORCPT ); Thu, 31 Oct 2019 10:26:22 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id EE504290879 From: Adrian Ratiu To: linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-rockchip@lists.infradead.org Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH 0/4] Genericize DW MIPI DSI bridge and add i.MX 6 driver Date: Thu, 31 Oct 2019 16:26:29 +0200 Message-Id: <20191031142633.12460-1-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Having a generic Synopsis DesignWare MIPI-DSI host controller bridge driver is a very good idea, however the current implementation has hardcoded quite a lot of the register layouts used by the two supported SoC vendors, STM and Rockchip, which use IP cores v1.30 and v1.31. This makes it hard to support other SoC vendors like the FSL/NXP i.MX 6 which use older v1.01 cores or future versions because, based on history, layout changes should also be expected in new DSI versions / SoCs. This patch series converts the bridge and platform drivers to access registers via generic regmap APIs and allows each platform driver to configure its register layout via struct reg_fields, then adds support for the host controller found on i.MX 6. I only have i.MX hardware with MIPI-DSI panel and relevant documentation available for testing so I'll really appreciate it if someone could test the series on Rockchip and STM... eyeballing register fields could only get me so far, so sorry in advance for any breakage! Many thanks to Boris Brezillon for suggesting the regmap solution and to Liu Ying for doing the initial i.MX platform driver implementation. This series applies on top of latest linux-next tree, next-20191031. Adrian Ratiu (4): drm: bridge: dw_mipi_dsi: access registers via a regmap drm: bridge: dw_mipi_dsi: abstract register access using reg_fields drm: imx: Add i.MX 6 MIPI DSI host driver dt-bindings: display: add IMX MIPI DSI host controller doc .../bindings/display/imx/mipi-dsi.txt | 56 ++ drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 518 +++++++++--------- drivers/gpu/drm/imx/Kconfig | 7 + drivers/gpu/drm/imx/Makefile | 1 + drivers/gpu/drm/imx/dw_mipi_dsi-imx.c | 502 +++++++++++++++++ .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 154 +++++- drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 160 +++++- include/drm/bridge/dw_mipi_dsi.h | 60 +- 8 files changed, 1185 insertions(+), 273 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/imx/mipi-dsi.txt create mode 100644 drivers/gpu/drm/imx/dw_mipi_dsi-imx.c -- 2.23.0