From nobody Fri May 17 09:38:24 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1614103091; cv=none; d=zohomail.com; s=zohoarc; b=Tj61XOq3PY7hAE1vYlCdChETJ5ALP6kyZ4pUvAz3SXDPeyVs6caruwAor8BnoiNqPsDnwifNe/KdEAkX7OtbTYKl6cLndFXMZ6B6OI3+E8SIWZMi+V3GLYVvVSvB0TF9kLW47+7GkKgcYnT9cYM6U2XmPwM4OHTKaSDtoBG4POU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614103091; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=Fz8JrLPMkT7XzSR8iw0swckFELH4bbKO9UQzLaHxj28=; b=h4WDN5F1ry2aHDUl0yMBAqS6o/3NfBWv762tyM7mx+/duSvbcVp8xIa5cBD/DrSYziboBhrNsseZ0kBzp+dNzPwkhj7IcfEYazAN7nZ3nCGU0/AJH1ajECuDW8oaQyOfDxP4yHgmp/UG3/BsLEGKlOARPYfjlyPLar88oXT9aT8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1614103091252646.423389429932; Tue, 23 Feb 2021 09:58:11 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233820AbhBWR5W (ORCPT ); Tue, 23 Feb 2021 12:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233782AbhBWR44 (ORCPT ); Tue, 23 Feb 2021 12:56:56 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 191E1C06174A; Tue, 23 Feb 2021 09:56:15 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id h98so18677397wrh.11; Tue, 23 Feb 2021 09:56:15 -0800 (PST) Received: from localhost.localdomain (2a01cb0008bd270084c09ff22cc10cb2.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:84c0:9ff2:2cc1:cb2]) by smtp.gmail.com with ESMTPSA id g9sm2779815wrp.14.2021.02.23.09.56.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 09:56:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fz8JrLPMkT7XzSR8iw0swckFELH4bbKO9UQzLaHxj28=; b=sgYop5FXxSudUTh7RZpkxYiXIeFsJ4OZAz+iEv+4P1jE3SlvZy4hGFfF9aNU8SGmkO 7AwRJVwXz3mu8FwpZJGRRXFkVyCfx7HXFgn3lVk8xMuJzMGpdG1QcgEAab9ZhCq7ypYx cLveXMybtivlWB+h5qMuWFWZ6lJZrDsxSvkKNqVFWATbE+T3PQOFuWfT4wy6hw7KM8W5 IJcF511TLwtnHoHTQyZT9kDUZbIIHMwachrknuJJjfdgtMoVg9+yPMuOdeLEjn33CVcQ Ye3r70UxQB76peeHP5iJmh30LLfX/s9zowIyK02hA1aSgZts3/Vb+zCZ4dlNByxlzA91 fTIw== 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=Fz8JrLPMkT7XzSR8iw0swckFELH4bbKO9UQzLaHxj28=; b=DYkIcEv8FN4hWRvcPIoDg329cvnxxc4qCKSWozNz6hQlLO6wucAe/JiJUoEOUEVQsE xnYPjySqV4ijmzwxxZs/uGBTJzJWuKDviFpznOpZZ09Dq7o0t08vrqUSB38Z8WBTYRoX S/iBzkYwWpEUyyux8rE6tlRZJ8VVzCqNvd1hE/sjD3KMlkYj2Ncp7ae30A/Zg0QDP3zC odxczmvTiWOi4Fdb4otIvpom/QCnI040rVPkiaiz/Iy2dC4kCkGAf9RpB6LASub2Zedr 2mfz+9BZ0PFnZewYElIfsNByRvl2QNpm5XFpOQ0EdnWsn2xgQyZwqE+D/UppoUe2335B oaVw== X-Gm-Message-State: AOAM531A8E1TmLmp87wiKygJN+28x0ngQjmJ42Id/ThA0RshEjzxJQYu AaNcEo0Ir4VWv2W3gnQxHYY= X-Google-Smtp-Source: ABdhPJzjcIFilXskzGrhtEqfLv7/lVpHTYUnrt7FdEsPWWoPRLWjZWGinAOiZSuomQE1Tf7036xDWQ== X-Received: by 2002:adf:c101:: with SMTP id r1mr27793261wre.38.1614102973856; Tue, 23 Feb 2021 09:56:13 -0800 (PST) From: Adrien Grassein Cc: robert.foss@linaro.org, airlied@linux.ie, daniel@ffwll.ch, a.hajda@samsung.com, robh+dt@kernel.org, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@siol.net, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Adrien Grassein , Rob Herring Subject: [PATCH v4 1/2] dt-bindings: display: bridge: Add documentation for LT8912 Date: Tue, 23 Feb 2021 18:56:06 +0100 Message-Id: <20210223175607.431796-2-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210223175607.431796-1-adrien.grassein@gmail.com> References: <20210223175607.431796-1-adrien.grassein@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Lontium LT8912 is a DSI to HDMI bridge. Signed-off-by: Adrien Grassein Reviewed-by: Rob Herring --- .../display/bridge/lontium,lt8912.yaml | 102 ++++++++++++++++++ MAINTAINERS | 5 + 2 files changed, 107 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/lontiu= m,lt8912.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/lontium,lt891= 2.yaml b/Documentation/devicetree/bindings/display/bridge/lontium,lt8912.ya= ml new file mode 100644 index 000000000000..1e5a2ad5eb47 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/lontium,lt8912.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Lontium LT8912 MIPI to HDMI Bridge + +maintainers: + - Adrien Grassein + +description: | + The LT8912 is a bridge device which convert DSI to HDMI + +properties: + compatible: + enum: + - lontium,lt8912 + + reg: + maxItems: 1 + + reset-gpios: + maxItems: 1 + description: GPIO connected to active high RESET pin. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: + Primary MIPI port for MIPI input + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: true + + required: + - data-lanes + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: | + HDMI port, should be connected to a node compatible with the + hdmi-connector binding. + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - reset-gpios + - ports + +additionalProperties: false + +examples: + - | + #include + + i2c4 { + #address-cells =3D <1>; + #size-cells =3D <0>; + + hdmi-bridge@48 { + compatible =3D "lontium,lt8912"; + reg =3D <0x48>; + reset-gpios =3D <&max7323 0 GPIO_ACTIVE_LOW>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + hdmi_out_in: endpoint { + data-lanes =3D <0 1 2 3>; + remote-endpoint =3D <&mipi_dsi_out>; + }; + }; + + port@1 { + reg =3D <1>; + + endpoint { + remote-endpoint =3D <&hdmi_in>; + }; + }; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 16ada1a4b751..1e4d49f9dfea 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10460,6 +10460,11 @@ S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git F: drivers/hid/hid-lg-g15.c =20 +LONTIUM LT8912 MIPI TO HDMI BRIDGE +M: Adrien Grassein +S: Maintained +F: Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml + LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) M: Sathya Prakash M: Sreekanth Reddy --=20 2.25.1 From nobody Fri May 17 09:38:24 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1614103091; cv=none; d=zohomail.com; s=zohoarc; b=FT/lEOGQIQJfMk4WVLsZxTXufR+e6snTGH0mADsHeccFqoNK9PQbwoyQINqeT6QPauPU52tLpXOrbWrF2aw/MOfGAorWVlCnSoAF5Uz2R05TSAwGJP8DeX4l7ZoRofWQbozUHN5LiO3g6EBQJwaKACDhM6U1uMGlr4uD/6qPLFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614103091; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=fmehHvZhMVDRp8KKz/HzZdJwk6qFdxkh0ZiJ6WUqRTs=; b=kYDktvLV7pgArlLJp6y5cCvR8jYAYSqPJf0Z1xLirK1VOE8AxVMVMkGyapwA5aR0f4kWgfuGuW5LsaBiuVYQfhaFJapDvaQnHTeQdbWKrHJTYInJcEljPh5BEE3guCely1uIWksQ6ne7Td9XN2dIPFaCA7RHXlXiguMTWCXZwTs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 161410309160558.054792470551774; Tue, 23 Feb 2021 09:58:11 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233801AbhBWR5e (ORCPT ); Tue, 23 Feb 2021 12:57:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233783AbhBWR44 (ORCPT ); Tue, 23 Feb 2021 12:56:56 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8ED0C061786; Tue, 23 Feb 2021 09:56:15 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id b3so23470196wrj.5; Tue, 23 Feb 2021 09:56:15 -0800 (PST) Received: from localhost.localdomain (2a01cb0008bd270084c09ff22cc10cb2.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:84c0:9ff2:2cc1:cb2]) by smtp.gmail.com with ESMTPSA id g9sm2779815wrp.14.2021.02.23.09.56.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 09:56:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fmehHvZhMVDRp8KKz/HzZdJwk6qFdxkh0ZiJ6WUqRTs=; b=VtX2Fgwd6U1v4F5I6Y/LLmPG0Dpo3zvW5FBOCRdHW6nZX/pQgTeDlM7ZzO6U+joDha eae+Tq6D4w124K+oy9Q8WFaAMjQ7w/voqutmDb6h+eouH7c3rKjDrWU0aOynzbR2skWy //xsbYhqSatedcZXH3j94bhpPTUpxBQExSq635GK/O9qTPvNhja2XvrbTQxeSxszDiFv lyrtXjE9b2L081JZiY8gRj2ZIokchUwyrkZ8QE1uVchPVzJAqC0Cxxrq0cZrmfVxdDwr R8yWUngkEcGqTSIg1otjdLrExoCTv3RuPvXVqVZcXtwfyt9gKOZAAwekAc1WAhUXrqmA BYIw== 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=fmehHvZhMVDRp8KKz/HzZdJwk6qFdxkh0ZiJ6WUqRTs=; b=HdmgKjUfM7JCgFWTjdnpDNMLqWTJ58/ACKAjbhd+ISIppylsDi/0gNjUjlVLLRcAq7 dGmmme89olCTt3s9+mvydX2vqSuAQyO07qFjKXtleZ4/lLTBHjuG96kefuLYmN4e9p/O w4JKPfJT64EhUPX9e9Wdz1Mf9WwSiow6/t6kj+YbYMjtO3M0y0e2DNOrMVFYCNLi4neZ 8MPsrRt8ZsxNFqfwbgzb0pBhhTzq3auv6uEucsnmDINxoPmY6UVG4bQeipzHyQ1tDNJ7 /KYHVDVf77kUcTc2nU/k6lsF/JGv0j+Fe3Mhn+bMXlRxB16miWw0XTVbcuPyfmDk0iEB oumw== X-Gm-Message-State: AOAM532UWkHgIUDVNXDbIsTwFie76dUC7xdGVYxx7j7SCOfGoey21D7I pZNV+PW7zeVle4qZccLUdVg= X-Google-Smtp-Source: ABdhPJynQ8QPCGPpwmHMyo1xsK78NTXRJyQ7ahNUGgSkl/ECzTBNLrykpndgTLZVyGzE0Lq0LsE1TQ== X-Received: by 2002:a5d:558b:: with SMTP id i11mr28088540wrv.125.1614102974461; Tue, 23 Feb 2021 09:56:14 -0800 (PST) From: Adrien Grassein Cc: robert.foss@linaro.org, airlied@linux.ie, daniel@ffwll.ch, a.hajda@samsung.com, robh+dt@kernel.org, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@siol.net, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Adrien Grassein Subject: [PATCH v4 2/2] drm/bridge: Introduce LT8912 DSI to HDMI bridge Date: Tue, 23 Feb 2021 18:56:07 +0100 Message-Id: <20210223175607.431796-3-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210223175607.431796-1-adrien.grassein@gmail.com> References: <20210223175607.431796-1-adrien.grassein@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Lontium Lt8912 is a DSI to HDMI bridge. Signed-off-by: Adrien Grassein --- MAINTAINERS | 1 + drivers/gpu/drm/bridge/Kconfig | 14 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt8912.c | 764 ++++++++++++++++++++++++ 4 files changed, 780 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt8912.c diff --git a/MAINTAINERS b/MAINTAINERS index 1e4d49f9dfea..fda331610c35 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10464,6 +10464,7 @@ LONTIUM LT8912 MIPI TO HDMI BRIDGE M: Adrien Grassein S: Maintained F: Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml +F: drivers/gpu/drm/bridge/lontium-lt8912.c =20 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) M: Sathya Prakash diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index e4110d6ca7b3..5b36d4b86e3c 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -48,6 +48,20 @@ config DRM_DISPLAY_CONNECTOR on ARM-based platforms. Saying Y here when this driver is not needed will not cause any issue. =20 +config DRM_LONTIUM_LT8912 + tristate "Lontium LT8912 DSI/HDMI bridge" + depends on OF + select DRM_PANEL_BRIDGE + select DRM_KMS_HELPER + select REGMAP_I2C + help + Driver for Lontium LT8912 DSI to HDMI bridge + chip driver. + Please say Y if you have such hardware. + + Say M here if you want to support this hardware as a module. + The module will be named "lontium-lt8912". + config DRM_LONTIUM_LT9611 tristate "Lontium LT9611 DSI/HDMI bridge" select SND_SOC_HDMI_CODEC if SND_SOC diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makef= ile index 86e7acc76f8d..5a1b201cea1f 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -2,6 +2,7 @@ obj-$(CONFIG_DRM_CDNS_DSI) +=3D cdns-dsi.o obj-$(CONFIG_DRM_CHRONTEL_CH7033) +=3D chrontel-ch7033.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) +=3D display-connector.o +obj-$(CONFIG_DRM_LONTIUM_LT8912) +=3D lontium-lt8912.o obj-$(CONFIG_DRM_LONTIUM_LT9611) +=3D lontium-lt9611.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) +=3D lontium-lt9611uxc.o obj-$(CONFIG_DRM_LVDS_CODEC) +=3D lvds-codec.o diff --git a/drivers/gpu/drm/bridge/lontium-lt8912.c b/drivers/gpu/drm/brid= ge/lontium-lt8912.c new file mode 100644 index 000000000000..11d94da73c37 --- /dev/null +++ b/drivers/gpu/drm/bridge/lontium-lt8912.c @@ -0,0 +1,764 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include