From patchwork Fri May 15 13:12:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_G=C3=BCnther?= X-Patchwork-Id: 11551509 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C39AE139A for ; Fri, 15 May 2020 13:13:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A427320759 for ; Fri, 15 May 2020 13:13:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pMZ043P5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A427320759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ksX681p6eXI7nC/VaOSQDofcnaNKKdDCbPrYy0QK6nI=; b=pMZ043P5jtCDlJ G3Ltjs3e0ANfSniy/z2gxTImtuM2cRVylKYrMvJhfoVk8tPJU0CBVBiB7pgI4VSJ7EwW5WT3J70pY wFw2Ho6COySTAogtlXNGEuLwZggwd2q1Fh/lfs4k2fHXm7faGcLDJf4k+9pKqxBcZEDV3aqdnbwrL ZUW7hvtNb+C8GLk9uDq5dSU4MXt+LsSVSEDOd9arHwOOhUwg3W0ubNG9vrfmc57G12NJePwaTqTfd HWsNPYdyHpXezfzbZ81HkZrlcSdobf4vI78Yjr/zPGYYldmrILrnvwrPxbLJW7vQz8xHsrn+jW6LJ 8TCxyV2pkZs4NRCjsFCw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa9o-0001o8-4n; Fri, 15 May 2020 13:13:44 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa8Y-0000JF-4v for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2020 13:12:30 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 52834FB02; Fri, 15 May 2020 15:12:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f2J9qBn8ahqL; Fri, 15 May 2020 15:12:16 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 686394458A; Fri, 15 May 2020 15:12:15 +0200 (CEST) From: =?utf-8?q?Guido_G=C3=BCnther?= To: Laurent Pinchart , David Airlie , Daniel Vetter , Rob Herring , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrzej Hajda , Sam Ravnborg , Anson Huang , Leonard Crestez , Lucas Stach , Peng Fan , Robert Chiras , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 1/6] dt-bindings: display/bridge: Add binding for input mux bridge Date: Fri, 15 May 2020 15:12:10 +0200 Message-Id: <14a44a664f40584ffa25c1764aab5ebf97809c71.1589548223.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200515_061226_396769_A50D78D1 X-CRM114-Status: GOOD ( 11.54 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The bridge allows to select the input source via a mux controller. Signed-off-by: Guido Günther --- .../display/bridge/mux-input-bridge.yaml | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/mux-input-bridge.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/mux-input-bridge.yaml b/Documentation/devicetree/bindings/display/bridge/mux-input-bridge.yaml new file mode 100644 index 000000000000..4029cf63ee5c --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/mux-input-bridge.yaml @@ -0,0 +1,123 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/mux-input-bridge.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: DRM input source selection via multiplexer + +maintainers: + - Guido Gúnther + +description: | + The input multiplexer bridge allows to select an input source + via an associated mux controller. + +properties: + compatible: + const: mux-input-bridge + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + default-input: + description: The default input to use + + mux-controls: + description: + mux controller node to use for operating the input mux + + ports: + type: object + properties: + '#address-cells': + const: 1 + '#size-cells': + const: 0 + + patternProperties: + "^port@[0-9]+": + type: object + description: + At least three nodes containing endpoints connecting to the + pixel data inputs and outputs. The last port is always the + output port. + + properties: + reg: + maxItems: 1 + + endpoint: + description: sub-node describing the input + type: object + + required: + - reg + + additionalProperties: false + + required: + - port@0 + - port@1 + - port@2 + + additionalProperties: false + +required: + - '#address-cells' + - '#size-cells' + - mux-controls + - ports + +additionalProperties: false + +examples: + - | + #include + + mux: mux-controller { + compatible = "gpio-mux"; + #mux-control-cells = <0>; + + mux-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; + }; + + mipi-mux { + compatible = "mux-input-bridge"; + default-input = <0>; + mux-controls = <&mux 0>; + #address-cells = <1>; + #size-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dpi_mux_from_lcdif: endpoint { + remote-endpoint = <&lcdif_dpi_out>; + }; + }; + + port@1 { + reg = <1>; + + dpi_mux_from_dccss: endpoint { + remote-endpoint = <&dcss_dpi_out>; + }; + }; + + port@2 { + reg = <2>; + + dpi_mux_out: endpoint { + remote-endpoint = <&nwl_dpi_in>; + }; + }; + }; + }; From patchwork Fri May 15 13:12:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_G=C3=BCnther?= X-Patchwork-Id: 11551501 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 65C151391 for ; Fri, 15 May 2020 13:13:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4291C20657 for ; Fri, 15 May 2020 13:13:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="A8sxgBCQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4291C20657 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tkqA4/DOY/5gbuC21U7HAk+OA91qvFCl5EU1SWiNWdA=; b=A8sxgBCQjF5ESB uEcYR7dZQHke1oJyb8oneZNeCyoOqhh9+RazpMykid4kb9okYH4FIkiheN0GkiVNz8pULML7W5Go9 91nFtRgFMxt2Be5EseItd/gtKZ5jQPlj4oX9mcRQxwxu1f/TXxL9S5fyBYgE9Fne7qZko828SGzcO LaMQO8vwRBFBYztkITtyd8ps1SrAgCkyZ8m9XjfxPi+pneRz+DxaXmvXeHQiJqfFbO2aWVA+pNmuR ZDTRM71xeqhAX/EhuSqfJ732DKBlq7xbddeRStZ17ReXirBI3dJZ8mP/ZIY5QHL4/6HkgX4bvkmhp TwnDtbWPACm9tb5U0Wkw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa9G-000140-RP; Fri, 15 May 2020 13:13:10 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa8Y-0000KF-DA for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2020 13:12:31 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id E9585FB04; Fri, 15 May 2020 15:12:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ud4qQG39xKE9; Fri, 15 May 2020 15:12:19 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 6D3FB445A8; Fri, 15 May 2020 15:12:15 +0200 (CEST) From: =?utf-8?q?Guido_G=C3=BCnther?= To: Laurent Pinchart , David Airlie , Daniel Vetter , Rob Herring , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrzej Hajda , Sam Ravnborg , Anson Huang , Leonard Crestez , Lucas Stach , Peng Fan , Robert Chiras , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 2/6] drm/bridge: Add mux-input bridge Date: Fri, 15 May 2020 15:12:11 +0200 Message-Id: <1d4a97de9acea438f156092dfd1434eb160bf861.1589548223.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200515_061226_815259_1BB0ECFF X-CRM114-Status: GOOD ( 18.63 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This bridge allows to select the input source via a mux controller. The input source is determined via DT but it could become rutime selectable in the future. Signed-off-by: Guido Günther --- drivers/gpu/drm/bridge/Kconfig | 9 ++ drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/mux-input.c | 238 +++++++++++++++++++++++++++++ 3 files changed, 248 insertions(+) create mode 100644 drivers/gpu/drm/bridge/mux-input.c diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 04f876e985de..3886c0f41bdd 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -206,6 +206,15 @@ config DRM_TI_TPD12S015 Texas Instruments TPD12S015 HDMI level shifter and ESD protection driver. +config DRM_MUX_INPUT + tristate "Bridge to select a video input source" + depends on OF + depends on DRM_BRIDGE + select MULTIPLEXER + help + Select this option if you want to select the input source to + a DRM bridge or panel via a separate mux chip. + source "drivers/gpu/drm/bridge/analogix/Kconfig" source "drivers/gpu/drm/bridge/adv7511/Kconfig" diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index d63d4b7e4347..9f3370ce7e07 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.o obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v3-fw.o +obj-$(CONFIG_DRM_MUX_INPUT) += mux-input.o obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o obj-$(CONFIG_DRM_PARADE_PS8640) += parade-ps8640.o diff --git a/drivers/gpu/drm/bridge/mux-input.c b/drivers/gpu/drm/bridge/mux-input.c new file mode 100644 index 000000000000..24961d41ac30 --- /dev/null +++ b/drivers/gpu/drm/bridge/mux-input.c @@ -0,0 +1,238 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2020 Purism SPC + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define DRV_NAME "mux-input-bridge" + +struct mux_input { + struct drm_bridge bridge; + struct drm_bridge *out; + struct device *dev; + struct mux_control *mux; + unsigned int n_inputs; + unsigned int input; + struct drm_bridge_timings timings; +}; + +static inline struct mux_input *bridge_to_mux_input(struct drm_bridge *bridge) +{ + return container_of(bridge, struct mux_input, bridge); +} + +static void mux_input_bridge_disable(struct drm_bridge *bridge) +{ + struct mux_input *mux_input = bridge_to_mux_input(bridge); + + pm_runtime_put(mux_input->dev); +} + +static void mux_input_bridge_pre_enable(struct drm_bridge *bridge) +{ + struct mux_input *mux_input = bridge_to_mux_input(bridge); + + pm_runtime_get(mux_input->dev); +} + +static int mux_input_bridge_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) +{ + struct mux_input *mux_input = bridge_to_mux_input(bridge); + struct drm_bridge *panel_bridge; + struct drm_panel *panel; + struct device *dev; + struct device_node *remote; + int ret; + + /* Only attach to the selected input */ + remote = of_graph_get_remote_node(mux_input->dev->of_node, + mux_input->input, + 0); + if (!remote) + return -EINVAL; + + if (bridge->dev) { + dev = bridge->dev->dev; + if (dev->of_node != remote) { + DRM_DEV_DEBUG(mux_input->dev, + "Not attaching to endpoint %s", + dev->of_node->name); + return -EINVAL; + } + } + of_node_put(remote); + + ret = drm_of_find_panel_or_bridge(mux_input->dev->of_node, + mux_input->n_inputs - 1, 0, &panel, + &panel_bridge); + if (ret) + return ret; + + if (panel) { + panel_bridge = drm_panel_bridge_add(panel); + if (IS_ERR(panel_bridge)) + return PTR_ERR(panel_bridge); + } + mux_input->out = panel_bridge; + + if (!mux_input->out) + return -EPROBE_DEFER; + + /* Bubble downstream bridge timings upwards */ + memcpy(&mux_input->timings, mux_input->out->timings, + sizeof(mux_input->timings)); + mux_input->bridge.timings = &mux_input->timings; + return drm_bridge_attach(bridge->encoder, mux_input->out, bridge, + flags); +} + +static void mux_input_bridge_detach(struct drm_bridge *bridge) +{ struct mux_input *mux_input = bridge_to_mux_input(bridge); + + drm_of_panel_bridge_remove(mux_input->dev->of_node, + mux_input->n_inputs - 1, 0); +} + +static const struct drm_bridge_funcs mux_input_bridge_funcs = { + .pre_enable = mux_input_bridge_pre_enable, + .disable = mux_input_bridge_disable, + .attach = mux_input_bridge_attach, + .detach = mux_input_bridge_detach, +}; + +static int mux_input_select_input(struct mux_input *mux_input) +{ + int ret; + + DRM_DEV_DEBUG(mux_input->dev, "Using input %d as pixel source\n", + mux_input->input); + ret = mux_control_try_select(mux_input->mux, mux_input->input); + if (ret < 0) { + DRM_DEV_ERROR(mux_input->dev, "Failed to select input: %d\n", + ret); + } + + return ret; +} + +static int mux_input_deselect_input(struct mux_input *mux_input) +{ + int ret; + + ret = mux_control_deselect(mux_input->mux); + if (ret < 0) { + DRM_DEV_ERROR(mux_input->dev, "Failed to deselect input: %d\n", + ret); + } + + return ret; +} + +static const struct of_device_id mux_input_dt_ids[] = { + { .compatible = "mux-input-bridge", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, mux_input_dt_ids); + +static int mux_input_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + struct device *dev = &pdev->dev; + struct device_node *ep; + struct mux_input *mux_input; + int ret; + + mux_input = devm_kzalloc(dev, sizeof(*mux_input), GFP_KERNEL); + if (!mux_input) + return -ENOMEM; + + mux_input->dev = dev; + + /* + * The largest numbered port is the output port. It determines + * total number of ports. + */ + for_each_endpoint_of_node(np, ep) { + struct of_endpoint endpoint; + + of_graph_parse_endpoint(ep, &endpoint); + mux_input->n_inputs = max(mux_input->n_inputs, + endpoint.port + 1); + } + + if (mux_input->n_inputs < 2) { + DRM_DEV_ERROR(dev, "Not enough ports %d\n", + mux_input->n_inputs); + return -EINVAL; + } + + if (device_property_read_u32(dev, "default-input", + &mux_input->input)) + mux_input->input = 0; + + if (mux_input->input > mux_input->n_inputs - 2) { + DRM_DEV_ERROR(dev, "Invalid default port %d\n", + mux_input->input); + return -EINVAL; + } + + mux_input->mux = devm_mux_control_get(dev, NULL); + if (IS_ERR(mux_input->mux)) { + ret = PTR_ERR(mux_input->mux); + if (ret != -EPROBE_DEFER) + DRM_DEV_ERROR(dev, "Failed to get mux: %d\n", ret); + return ret; + } + + mux_input->bridge.driver_private = mux_input; + mux_input->bridge.funcs = &mux_input_bridge_funcs; + mux_input->bridge.of_node = dev->of_node; + + dev_set_drvdata(dev, mux_input); + pm_runtime_enable(dev); + + ret = mux_input_select_input(mux_input); + if (ret < 0) { + pm_runtime_disable(&pdev->dev); + return ret; + } + + drm_bridge_add(&mux_input->bridge); + return 0; +} + +static int mux_input_remove(struct platform_device *pdev) +{ + struct mux_input *mux_input = platform_get_drvdata(pdev); + + mux_input_deselect_input(mux_input); + drm_bridge_remove(&mux_input->bridge); + pm_runtime_disable(&pdev->dev); + return 0; +} + +static struct platform_driver mux_input_driver = { + .probe = mux_input_probe, + .remove = mux_input_remove, + .driver = { + .of_match_table = mux_input_dt_ids, + .name = DRV_NAME, + }, +}; + +module_platform_driver(mux_input_driver); + +MODULE_AUTHOR("Purism SPC"); +MODULE_DESCRIPTION("Mux input bridge"); +MODULE_LICENSE("GPL"); From patchwork Fri May 15 13:12:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_G=C3=BCnther?= X-Patchwork-Id: 11551495 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE62A1391 for ; Fri, 15 May 2020 13:12:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 CA055206D4 for ; Fri, 15 May 2020 13:12:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="d/4u/3BO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA055206D4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5ZrayyXAwD+bbE1xJgtZ1agOTjFjeYtJ9vt533sEVyA=; b=d/4u/3BOSEr6em okTgnb6afQd1vJel4xyxJzW98blmT3SH0ewsS03PSrQ3YsvX24uUNd6ZXDKsoKm/L6ususz89K+00 riDk8xzZCB/ytGHnRJlzHIpIjJN7/KDcFtsmdieSTTeaaOttr3st3XXFIFHTk8qWAZUJSbuAeV1vu YSPRT0zE/Juv77Sz0uSpXHpI9ILvd69oJVQLPm1eOoFwbtDKC9U0xgYi06uhunJZUoVKdC469i34M WvvjkKjkEz4QgWTjDDL24oh5MS2/aQm2mEbu0SWtLVWPtt2vB6xjpDuEmIcjoEMw1sBREBNcH/5XH rzngnDiPxjYbI5+DC9+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa8o-0000Y1-Po; Fri, 15 May 2020 13:12:42 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa8Y-0000JL-7w for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2020 13:12:28 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 76D87FB03; Fri, 15 May 2020 15:12:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g8I1dDNq2x7s; Fri, 15 May 2020 15:12:18 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 78087445AA; Fri, 15 May 2020 15:12:15 +0200 (CEST) From: =?utf-8?q?Guido_G=C3=BCnther?= To: Laurent Pinchart , David Airlie , Daniel Vetter , Rob Herring , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrzej Hajda , Sam Ravnborg , Anson Huang , Leonard Crestez , Lucas Stach , Peng Fan , Robert Chiras , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 3/6] dt-bindings: display/bridge/nwl-dsi: Drop mux handling Date: Fri, 15 May 2020 15:12:12 +0200 Message-Id: <9884c56219e9bdbeec179c27ea2b734dbb5f1289.1589548223.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200515_061226_480942_1BE0677C X-CRM114-Status: UNSURE ( 8.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org No need to encode the SoC specifics in the bridge driver. For the imx8mq we can use the mux-input-bridge. Signed-off-by: Guido Günther --- .../devicetree/bindings/display/bridge/nwl-dsi.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/nwl-dsi.yaml b/Documentation/devicetree/bindings/display/bridge/nwl-dsi.yaml index 8aff2d68fc33..d2c2d4e19a25 100644 --- a/Documentation/devicetree/bindings/display/bridge/nwl-dsi.yaml +++ b/Documentation/devicetree/bindings/display/bridge/nwl-dsi.yaml @@ -46,10 +46,6 @@ properties: - const: phy_ref - const: lcdif - mux-controls: - description: - mux controller node to use for operating the input mux - phys: maxItems: 1 description: @@ -151,7 +147,6 @@ required: - clocks - compatible - interrupts - - mux-controls - phy-names - phys - ports @@ -180,7 +175,6 @@ examples: <&clk IMX8MQ_CLK_LCDIF_PIXEL>; clock-names = "core", "rx_esc", "tx_esc", "phy_ref", "lcdif"; interrupts = ; - mux-controls = <&mux 0>; power-domains = <&pgc_mipi>; resets = <&src IMX8MQ_RESET_MIPI_DSI_RESET_BYTE_N>, <&src IMX8MQ_RESET_MIPI_DSI_DPI_RESET_N>, From patchwork Fri May 15 13:12:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_G=C3=BCnther?= X-Patchwork-Id: 11551497 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BB0E6139A for ; Fri, 15 May 2020 13:13:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 98ECA206D4 for ; Fri, 15 May 2020 13:13:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Tk0b+44Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98ECA206D4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xA417SJwhuYH4RbVWaRjXjQYZXKHoDpeJuX96mcCyBs=; b=Tk0b+44ZICB7Eu cowlRY0ElIU+nzef+PhRV0yYgEkLCl57AVUHxV2McZ9b0W/Bx+r686vQ8rEs6TBxueD7mQPS6MQVP AD61+P3yIUHSCbJsjqBxZ719kqmW8+WHfqFKV+mTK0rF4i4Q8Xsglun/kU55m8NGOPLHq0PPmJRUr sL1AIBW+EdTnzCgEKDwlIOy3/9g8wnNidP6O1elZUrvcMvBXQWgpNBU59tn1NT4cq8HUZaiVnuMBw raaRVpsS9vayNrvlko66PTVo4MYrBXffY9zkBA3+Hojg0T2TnK1VZJW2+6cC9nYUGpnVtkHoMxCsU QleuXz4IUB7PWcHQrjlw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa90-0000oH-Gn; Fri, 15 May 2020 13:12:54 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa8Z-0000LM-Nh for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2020 13:12:30 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 0CC7DFB05; Fri, 15 May 2020 15:12:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id brG_Y9P4LUL8; Fri, 15 May 2020 15:12:20 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 86BB7445AB; Fri, 15 May 2020 15:12:15 +0200 (CEST) From: =?utf-8?q?Guido_G=C3=BCnther?= To: Laurent Pinchart , David Airlie , Daniel Vetter , Rob Herring , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrzej Hajda , Sam Ravnborg , Anson Huang , Leonard Crestez , Lucas Stach , Peng Fan , Robert Chiras , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 4/6] drm/bridge/nwl-dsi: Drop mux handling Date: Fri, 15 May 2020 15:12:13 +0200 Message-Id: <951688795f969ebcbf9fb3c38065ccce6f488235.1589548223.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200515_061227_940582_228F0AE7 X-CRM114-Status: GOOD ( 13.19 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This will be handled via the mux-input-bridge. Signed-off-by: Guido Günther --- drivers/gpu/drm/bridge/Kconfig | 1 - drivers/gpu/drm/bridge/nwl-dsi.c | 61 -------------------------------- 2 files changed, 62 deletions(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 3886c0f41bdd..11444f841e35 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -78,7 +78,6 @@ config DRM_NWL_MIPI_DSI select DRM_PANEL_BRIDGE select GENERIC_PHY_MIPI_DPHY select MFD_SYSCON - select MULTIPLEXER select REGMAP_MMIO help This enables the Northwest Logic MIPI DSI Host controller as diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c index b14d725bf609..8839f333f39c 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -44,9 +43,6 @@ enum transfer_direction { DSI_PACKET_RECEIVE, }; -#define NWL_DSI_ENDPOINT_LCDIF 0 -#define NWL_DSI_ENDPOINT_DCSS 1 - struct nwl_dsi_plat_clk_config { const char *id; struct clk *clk; @@ -94,7 +90,6 @@ struct nwl_dsi { struct reset_control *rst_esc; struct reset_control *rst_dpi; struct reset_control *rst_pclk; - struct mux_control *mux; /* DSI clocks */ struct clk *phy_ref_clk; @@ -1018,14 +1013,6 @@ static int nwl_dsi_parse_dt(struct nwl_dsi *dsi) } dsi->tx_esc_clk = clk; - dsi->mux = devm_mux_control_get(dsi->dev, NULL); - if (IS_ERR(dsi->mux)) { - ret = PTR_ERR(dsi->mux); - if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dsi->dev, "Failed to get mux: %d\n", ret); - return ret; - } - base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); @@ -1073,47 +1060,6 @@ static int nwl_dsi_parse_dt(struct nwl_dsi *dsi) return 0; } -static int nwl_dsi_select_input(struct nwl_dsi *dsi) -{ - struct device_node *remote; - u32 use_dcss = 1; - int ret; - - remote = of_graph_get_remote_node(dsi->dev->of_node, 0, - NWL_DSI_ENDPOINT_LCDIF); - if (remote) { - use_dcss = 0; - } else { - remote = of_graph_get_remote_node(dsi->dev->of_node, 0, - NWL_DSI_ENDPOINT_DCSS); - if (!remote) { - DRM_DEV_ERROR(dsi->dev, - "No valid input endpoint found\n"); - return -EINVAL; - } - } - - DRM_DEV_INFO(dsi->dev, "Using %s as input source\n", - (use_dcss) ? "DCSS" : "LCDIF"); - ret = mux_control_try_select(dsi->mux, use_dcss); - if (ret < 0) - DRM_DEV_ERROR(dsi->dev, "Failed to select input: %d\n", ret); - - of_node_put(remote); - return ret; -} - -static int nwl_dsi_deselect_input(struct nwl_dsi *dsi) -{ - int ret; - - ret = mux_control_deselect(dsi->mux); - if (ret < 0) - DRM_DEV_ERROR(dsi->dev, "Failed to deselect input: %d\n", ret); - - return ret; -} - static const struct drm_bridge_timings nwl_dsi_timings = { .input_bus_flags = DRM_BUS_FLAG_DE_LOW, }; @@ -1175,12 +1121,6 @@ static int nwl_dsi_probe(struct platform_device *pdev) dev_set_drvdata(dev, dsi); pm_runtime_enable(dev); - ret = nwl_dsi_select_input(dsi); - if (ret < 0) { - mipi_dsi_host_unregister(&dsi->dsi_host); - return ret; - } - drm_bridge_add(&dsi->bridge); return 0; } @@ -1189,7 +1129,6 @@ static int nwl_dsi_remove(struct platform_device *pdev) { struct nwl_dsi *dsi = platform_get_drvdata(pdev); - nwl_dsi_deselect_input(dsi); mipi_dsi_host_unregister(&dsi->dsi_host); drm_bridge_remove(&dsi->bridge); pm_runtime_disable(&pdev->dev); From patchwork Fri May 15 13:12:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_G=C3=BCnther?= X-Patchwork-Id: 11551511 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03671139A for ; Fri, 15 May 2020 13:14:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BE56920657 for ; Fri, 15 May 2020 13:14:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jp4hAHI9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE56920657 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kEH+fxfHzhjYoMxkyyNWDrrVgTq1JzlECPe1RA4TIX0=; b=jp4hAHI9Obo+r2 VF6s6+gc7iXcBRt3P0+LHGva2hipBiNwyF0iDNI56FMx4ATAYDqDoFDSw8RtC1OPVcHmNnX4PE1WC 2fJW1W748jnadlXLyhzMJ9UJXjakOpliAOJELm8qAioEb05c1aj6ewJdxAT1qVwNdJm2pDloFJN2f CXa4K17LPCQHjBxl4GEo74t7y0gHlCfwfOOhrGtPMrQwUJUHnJ29d+eOiHWcEsoOz/gIPga0Poetq gBq9s3bdmeKPpwlOTDkSqaRfSHVd4nor1hVdZve0uV25xYjFeNXnL4z2JjDFvJ89n5tMuqsGvcfyf rLiK6s3uKX3foyGcVsfg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZaA2-00025A-F2; Fri, 15 May 2020 13:13:58 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa8c-0000QQ-38 for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2020 13:12:31 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 34B2AFB06; Fri, 15 May 2020 15:12:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0-lLz--REorz; Fri, 15 May 2020 15:12:23 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 8E898445A9; Fri, 15 May 2020 15:12:15 +0200 (CEST) From: =?utf-8?q?Guido_G=C3=BCnther?= To: Laurent Pinchart , David Airlie , Daniel Vetter , Rob Herring , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrzej Hajda , Sam Ravnborg , Anson Huang , Leonard Crestez , Lucas Stach , Peng Fan , Robert Chiras , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 5/6] arm64: dts: imx8mq: Add NWL dsi controller Date: Fri, 15 May 2020 15:12:14 +0200 Message-Id: <6f915d10ead271a1c155628efbc909d5eb9f4102.1589548223.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200515_061230_290839_31D8D0BF X-CRM114-Status: UNSURE ( 9.52 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a node for the Northwestlogic MIPI DSI IP core, "disabled" by default. Signed-off-by: Guido Günther --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi index 0142f06ead12..6bbbf44e6be0 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi @@ -889,6 +889,37 @@ sec_jr2: jr@3000 { }; }; + mipi_dsi: mipi-dsi@30a00000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx8mq-nwl-dsi"; + reg = <0x30a00000 0x300>; + clocks = <&clk IMX8MQ_CLK_DSI_CORE>, + <&clk IMX8MQ_CLK_DSI_AHB>, + <&clk IMX8MQ_CLK_DSI_IPG_DIV>, + <&clk IMX8MQ_CLK_DSI_PHY_REF>, + <&clk IMX8MQ_CLK_LCDIF_PIXEL>; + clock-names = "core", "rx_esc", "tx_esc", "phy_ref", "lcdif"; + assigned-clocks = <&clk IMX8MQ_CLK_DSI_AHB>, + <&clk IMX8MQ_CLK_DSI_CORE>, + <&clk IMX8MQ_CLK_DSI_IPG_DIV>; + assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_80M>, + <&clk IMX8MQ_SYS1_PLL_266M>; + assigned-clock-rates = <80000000>, + <266000000>, + <20000000>; + interrupts = ; + resets = <&src IMX8MQ_RESET_MIPI_DSI_RESET_BYTE_N>, + <&src IMX8MQ_RESET_MIPI_DSI_DPI_RESET_N>, + <&src IMX8MQ_RESET_MIPI_DSI_ESC_RESET_N>, + <&src IMX8MQ_RESET_MIPI_DSI_PCLK_RESET_N>; + reset-names = "byte", "dpi", "esc", "pclk"; + phys = <&dphy>; + phy-names = "dphy"; + power-domains = <&pgc_mipi>; + status = "disabled"; + }; + dphy: dphy@30a00300 { compatible = "fsl,imx8mq-mipi-dphy"; reg = <0x30a00300 0x100>; From patchwork Fri May 15 13:12:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_G=C3=BCnther?= X-Patchwork-Id: 11551507 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A74791391 for ; Fri, 15 May 2020 13:13:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 874D720657 for ; Fri, 15 May 2020 13:13:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZwSpdQcN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 874D720657 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Aem3l5bhPRWABqrqK8sC8qykWnxePpuCkykDkFykOJQ=; b=ZwSpdQcNg04xXa GgeoqwxqyOWXp9fDyIvb6dkdq59TrkkCg+CLErjY9E/EQ7qyADFRDH47ZE7gig73UchNWlOHgJqT0 JUkLBP8HauqQy1Ol1utWB6oZcQS0swwL3rJJXGrL27e+3g80sW7rLRhOq/oCRv3meo4SjQIWZr+0A hxXWo6+JKiG+vvjA7Fl9gC1NkYCFI46uxG9zRmElEKEH+zB5G7q4FMQqdupGwRNnCcnDd80bpLIz3 I5yBpS3jv8v4dHpyoH3XxmoKhrlFP5X65D6Z1Zu7IgBj30K2qMbblMfiIFkBEiTPTvkv8U/UeXoZI ebZ/ipBZ1eEc2v0fRUuQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa9f-0001Ys-AI; Fri, 15 May 2020 13:13:35 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa8c-0000RL-75 for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2020 13:12:31 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id BA145FB03; Fri, 15 May 2020 15:12:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7VPSUBShava6; Fri, 15 May 2020 15:12:26 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 98055445AC; Fri, 15 May 2020 15:12:15 +0200 (CEST) From: =?utf-8?q?Guido_G=C3=BCnther?= To: Laurent Pinchart , David Airlie , Daniel Vetter , Rob Herring , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrzej Hajda , Sam Ravnborg , Anson Huang , Leonard Crestez , Lucas Stach , Peng Fan , Robert Chiras , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 6/6] arm64: dts: imx8mq-librem5-devkit: Enable MIPI DSI panel Date: Fri, 15 May 2020 15:12:15 +0200 Message-Id: <7f91beb1ce51a88dbe43e69c8af35b8684c0ac4c.1589548223.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200515_061230_431261_46A5C14D X-CRM114-Status: UNSURE ( 8.85 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Enable MIPI LCD panel output by adding nodes for the NWL DSI host controller, the mux-input-bridge, the Rocktech panel and the eLCDIF display controller. Signed-off-by: Guido Günther --- .../dts/freescale/imx8mq-librem5-devkit.dts | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts index 7fc31c71a626..d98f9b8dede8 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -841,6 +841,87 @@ MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9 0x19 /* WWAN_RESET */ }; }; +&lcdif { + status = "okay"; + + port@0 { + lcdif_dpi_out: endpoint { + remote-endpoint = <&dpi_mux_from_lcdif>; + }; + }; +}; + +&iomuxc_gpr { + mipi_mux: mipi-mux { + compatible = "mux-input-bridge"; + mux-controls = <&mux 0>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + default-input = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dpi_mux_from_lcdif: endpoint { + remote-endpoint = <&lcdif_dpi_out>; + }; + }; + + port@1 { /* dcss */ + reg = <1>; + }; + + port@2 { + reg = <2>; + dpi_mux_out: endpoint { + remote-endpoint = <&nwl_dpi_in>; + }; + + }; + }; + }; +}; + +&mipi_dsi { + status = "okay"; + panel@0 { + compatible = "rocktech,jh057n00900"; + reg = <0>; + backlight = <&backlight_dsi>; + reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>; + vcc-supply = <®_2v8_p>; + iovcc-supply = <®_1v8_p>; + port@0 { + panel_in: endpoint { + remote-endpoint = <&nwl_dsi_out>; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + nwl_dpi_in: endpoint { + remote-endpoint = <&dpi_mux_out>; + }; + }; + port@1 { + reg = <1>; + nwl_dsi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; +}; + &pgc_gpu { power-supply = <&buck3_reg>; };