From patchwork Mon Mar 8 12:05:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Grassein X-Patchwork-Id: 12122071 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=-18.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,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 E3B1BC433E0 for ; Mon, 8 Mar 2021 12:06:06 +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 9220C64D92 for ; Mon, 8 Mar 2021 12:06:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9220C64D92 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 AC9F46E187; Mon, 8 Mar 2021 12:06:02 +0000 (UTC) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by gabe.freedesktop.org (Postfix) with ESMTPS id CFFD96E187 for ; Mon, 8 Mar 2021 12:06:00 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id u5-20020a7bcb050000b029010e9316b9d5so687075wmj.2 for ; Mon, 08 Mar 2021 04:06:00 -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=cM2++3M/eSEEuJa4YLSTVFheZ1nQSnnZ10I2ItxhVuk=; b=PUE4zEyZW80Drx5CxrktnlR2mjH9p2cgwpHRmcZjxtSY1LyJvOs9MM5exCJ6oVkjyS 5aXj/C1t5/m16Zp0kJjChV2FfZj7P3yJSUYB/EICdRiwhQUInKzcLUFnaa1m9b9sGLkb KlEJxOuEOgMZUHJ5ksvSlDd5/TFv38RK+uKBiDSD2U60d6bAXIJNMiHaVmFsjHA+DGD4 YD13n8M2XtC4ls7m8ffT8zFUYaCUYe/odBUoLG5PiI7gapbpmQAy8YtXPWL8fNFyVGqx LW1kCvXqUkX/6OplZwA7jb6m+C+4LY7JkJkPSR+Fa3A/sSPDtaYCyniT/eouDhAbR2fp 96OQ== 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=cM2++3M/eSEEuJa4YLSTVFheZ1nQSnnZ10I2ItxhVuk=; b=RTBipe28K9uRVUvvvDJQ5eOywSkLwa5T98FnYzgyaJybFJWrDNursXd6btgc8XEv15 88B7X4xQR9UiqQnYS8+abP55/rKijlyehQg/IWRUohoOfVKnWBMIag7x/WzMD47lmoj1 +AEaig+ekS+JsgDyZJg6mWTIvpEZhLEtzNDcanzbinhO2Jq8m5VWG8dkMsza8hohFLPx VQXEYFNpUlSFUeDxECZ61760UMfcN1jWhuLuzkPI3oD9JKbvNadWLr8S5r3nYP3JLfzC k7eeaIcrWDJPSmBMwCYqp8tmEg4YIbrLbYTWp2ZvBcYFQlUqXB/cgMu6+I64WD8VBsyS SDOg== X-Gm-Message-State: AOAM530oP650nkEmNYh6mqw6L0NWam5Uw063faYYcQj8bE5zHKsRIE/W bHYJjl+8R9M7wC7Jb5ZsqN4= X-Google-Smtp-Source: ABdhPJwXjMy3Srs/pdETswKGAsjrXKUht4cVZ2laZ3oyV24mkSCSGdxt6ZwMr3ZCZzLN51aB5Ijf8w== X-Received: by 2002:a05:600c:350e:: with SMTP id h14mr6334144wmq.4.1615205159581; Mon, 08 Mar 2021 04:05:59 -0800 (PST) Received: from adgra-XPS-15-9570.home (2a01cb0008bd270095bc7625808eade0.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:95bc:7625:808e:ade0]) by smtp.gmail.com with ESMTPSA id r7sm19031803wre.25.2021.03.08.04.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 04:05:59 -0800 (PST) From: Adrien Grassein To: Subject: [PATCH v7 1/2] dt-bindings: display: bridge: Add documentation for LT8912B Date: Mon, 8 Mar 2021 13:05:54 +0100 Message-Id: <20210308120555.252524-2-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210308120555.252524-1-adrien.grassein@gmail.com> References: <20210308120555.252524-1-adrien.grassein@gmail.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, jernej.skrabec@siol.net, narmstrong@baylibre.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, jonas@kwiboo.se, linux-kernel@vger.kernel.org, robert.foss@linaro.org, a.hajda@samsung.com, robh+dt@kernel.org, Laurent.pinchart@ideasonboard.com, Adrien Grassein Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Lontium LT8912B is a DSI to HDMI bridge. Signed-off-by: Adrien Grassein Reviewed-by: Rob Herring --- .../display/bridge/lontium,lt8912b.yaml | 102 ++++++++++++++++++ MAINTAINERS | 5 + 2 files changed, 107 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.yaml b/Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.yaml new file mode 100644 index 000000000000..735d0233a7d6 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.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,lt8912b.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Lontium LT8912B MIPI to HDMI Bridge + +maintainers: + - Adrien Grassein + +description: | + The LT8912B is a bridge device which convert DSI to HDMI + +properties: + compatible: + enum: + - lontium,lt8912b + + 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 = <1>; + #size-cells = <0>; + + hdmi-bridge@48 { + compatible = "lontium,lt8912b"; + reg = <0x48>; + reset-gpios = <&max7323 0 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + hdmi_out_in: endpoint { + data-lanes = <0 1 2 3>; + remote-endpoint = <&mipi_dsi_out>; + }; + }; + + port@1 { + reg = <1>; + + endpoint { + remote-endpoint = <&hdmi_in>; + }; + }; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 9095d182deaf..719f633c8a28 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10462,6 +10462,11 @@ S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git F: drivers/hid/hid-lg-g15.c +LONTIUM LT8912B MIPI TO HDMI BRIDGE +M: Adrien Grassein +S: Maintained +F: Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.yaml + LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) M: Sathya Prakash M: Sreekanth Reddy From patchwork Mon Mar 8 12:05:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Grassein X-Patchwork-Id: 12122073 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=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,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 C63CAC433DB for ; Mon, 8 Mar 2021 12:06:09 +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 3057A651C5 for ; Mon, 8 Mar 2021 12:06:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3057A651C5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 7EA5B6E24E; Mon, 8 Mar 2021 12:06:03 +0000 (UTC) Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by gabe.freedesktop.org (Postfix) with ESMTPS id F389E6E187 for ; Mon, 8 Mar 2021 12:06:01 +0000 (UTC) Received: by mail-wm1-x32e.google.com with SMTP id y124-20020a1c32820000b029010c93864955so3649358wmy.5 for ; Mon, 08 Mar 2021 04:06:01 -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=s14GtAPMqzXpxLuO9j0mqJKAGAaw6zTmurlpVyF8wsU=; b=AiGAkUG5eAbJa/LJF4/Dkl7dYxDDWAHwJ66t3aU7xqwPd9kjgft0QEHGLE0A5L+UBJ ufT5+4AGkjtY6Pdd6TAHSWDkF5//ci8K7T4IAHcFYUBJ8R0+rBZvBL4LwW7g6HqK5mwn wxYp+8la9x+dAn1Wt2NCjgwGhno8ALOL1maKZk31eQGiwt7sSGIah9pWHVm2+KMsUPut +D6OfT86Lkx7GQYwBgJgPmZlLax6BoT+pE1qauykHryXR+ivK2PjQ27/0pBypleXCAkP 4+lPltWhOszvkAv7nAwKBqSRHb4P4ZbFCILB8aH9JmKmHyip7cxG4I/CisH9Q64ikRw+ DDgg== 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=s14GtAPMqzXpxLuO9j0mqJKAGAaw6zTmurlpVyF8wsU=; b=VuQBcFYmZeFp+BJyTznmuBzyuDomrXm5CguKMFO6E+BFgMrCiwih4B058iItNwRhid yUDrp2SbpQc+ovnGdpMZkkE0iY7EEk7HJdxExZC+Iau4Kz+DrxNzpth54vdNq+7iZpCS UHOdeYvhafJ3+/Y9upD9/PkfgiWU0Nqab76wCS56fjhIe/f1/VqqcWBNtSQwKFIufoEB Fwj2KPIPgNFVm0E+XvZcLcpTXDk4kKZ5i5CXqwR20H2ZnF7gd+90XqvHChXEChdbA46F xSuI/uvSTA15IUss/6Nkt69mGxWlnwUcLgM2IzWew1SbfTsr98fpno7iWaBR9k7TCrpk vN2Q== X-Gm-Message-State: AOAM5333nvxvIWzz7qp4263Uj+wB9/EOCYwrhV7KD8iG2G4s7AcnPvgf IOqBRtTD7bg7yh6V2mxZWgc= X-Google-Smtp-Source: ABdhPJx1Q1Wt+TzqheNPRj9otSD1Rv4n8L5DJ5qG2WMyrpyNozoziZZnwApeKhe7invm+BEjUu0isQ== X-Received: by 2002:a05:600c:35c1:: with SMTP id r1mr22108750wmq.143.1615205160538; Mon, 08 Mar 2021 04:06:00 -0800 (PST) Received: from adgra-XPS-15-9570.home (2a01cb0008bd270095bc7625808eade0.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:95bc:7625:808e:ade0]) by smtp.gmail.com with ESMTPSA id r7sm19031803wre.25.2021.03.08.04.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 04:06:00 -0800 (PST) From: Adrien Grassein To: Subject: [PATCH v7 2/2] drm/bridge: Introduce LT8912B DSI to HDMI bridge Date: Mon, 8 Mar 2021 13:05:55 +0100 Message-Id: <20210308120555.252524-3-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210308120555.252524-1-adrien.grassein@gmail.com> References: <20210308120555.252524-1-adrien.grassein@gmail.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, jernej.skrabec@siol.net, kernel test robot , narmstrong@baylibre.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, jonas@kwiboo.se, linux-kernel@vger.kernel.org, robert.foss@linaro.org, a.hajda@samsung.com, robh+dt@kernel.org, Laurent.pinchart@ideasonboard.com, Adrien Grassein Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Lontium LT8912B is a DSI to HDMI bridge. Signed-off-by: Adrien Grassein Reported-by: kernel test robot Reviewed-by: Robert Foss --- MAINTAINERS | 1 + drivers/gpu/drm/bridge/Kconfig | 14 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt8912b.c | 836 +++++++++++++++++++++++ 4 files changed, 852 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt8912b.c diff --git a/MAINTAINERS b/MAINTAINERS index 719f633c8a28..072dea9c43ed 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10466,6 +10466,7 @@ LONTIUM LT8912B MIPI TO HDMI BRIDGE M: Adrien Grassein S: Maintained F: Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.yaml +F: drivers/gpu/drm/bridge/lontium-lt8912b.c 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..f2c5ec75d2f5 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. +config DRM_LONTIUM_LT8912B + tristate "Lontium LT8912B DSI/HDMI bridge" + depends on OF + select DRM_PANEL_BRIDGE + select DRM_KMS_HELPER + select REGMAP_I2C + help + Driver for Lontium LT8912B 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-lt8912b". + 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/Makefile index 86e7acc76f8d..756ce401aad3 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -2,6 +2,7 @@ obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o +obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.o diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c new file mode 100644 index 000000000000..82501fe2e408 --- /dev/null +++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c @@ -0,0 +1,836 @@ +// 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