From patchwork Wed Jan 27 08:51:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12049459 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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 5CA83C433E0 for ; Wed, 27 Jan 2021 09:22:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6CD720770 for ; Wed, 27 Jan 2021 09:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235078AbhA0JWf (ORCPT ); Wed, 27 Jan 2021 04:22:35 -0500 Received: from mail-vi1eur05on2065.outbound.protection.outlook.com ([40.107.21.65]:14080 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231903AbhA0JHO (ORCPT ); Wed, 27 Jan 2021 04:07:14 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H/6hczwx/JJNO46sS1g9qsRFZXhe9QZT457IZ/kkwUHzyCPiEgLA35IRJTvYuaLdsCcDm/FkBaHOUEptWoHTb6nrlXqS58cGUGRjAfSB3xLDEFi1wFltjH29Lx8MCy2cWBhpGuYGrrAbd56uAvKd/NG+19eMKs8DMQbi56yuL58kS+ijM1zm0XpvFoJyoUbLuBjhPPVXGScyRawLpp/jFzsfYxxyNE1TzYJVD0o5vvsUZmh1sjL54ZnxYyK99v9F6F8v9jGTAL5cfl6CzlwrX8TwH0HdDIOAKNMNgObKhalFEg9tJDfRWwrS86ugnQEKaIunCEwChmPhxoTi+JWWGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M5u8QQ2V+PfszvuIyyswuYKaKPVOFhSlmcgTBJ5xrdU=; b=PsnR74V2T/IJWHmIVRKs/cG58eWCRWpGGTgryAqEGNUdRM43nQkJRLX7fEG7zo/GaBCwFr6q/5uvCSALAEhisGdWRGqu8FS/nq9hUF0FpTl36xBB704eYm+hD8mDo5t1rKUhTWH3DDJo/XFvgwr0xilg9zIzrMqhxlweEDFf8dQTxd7tWzmSnPT32Zp059vUd2M9rCc2WDTNdTkqVbwJZ+c4146ldJCSg6Hus2Tb3oXxDnrrI6u6x66+0xx/FEtLKUVywKGRGILVC02sbbdJ73hwcHjJLXVZFnHse0fw+26fbxlhYvTlTUh4OdLzkGb5hdhMYXlQh+I2qSAkV8rBcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M5u8QQ2V+PfszvuIyyswuYKaKPVOFhSlmcgTBJ5xrdU=; b=N4xuaRXceRP2bC8rw3MZRMe/dOCWnvjfEEqjbQVVg+0gPbAL3ydjwrXQwITIlJEuarjQg4lC0DPk7GfR+S+ETjj0O8JUS6FjHAG95glXhej3UEHMhUTFkfnhfB+4akPZmwRBZZ1t6Uy4vUY/dgxTqPukrx9BN6jDJRmboc8ypUs= Authentication-Results: lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB3983.eurprd04.prod.outlook.com (2603:10a6:803:4c::16) by VI1PR04MB2975.eurprd04.prod.outlook.com (2603:10a6:802:9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.13; Wed, 27 Jan 2021 09:03:30 +0000 Received: from VI1PR04MB3983.eurprd04.prod.outlook.com ([fe80::2564:cacc:2da5:52d0]) by VI1PR04MB3983.eurprd04.prod.outlook.com ([fe80::2564:cacc:2da5:52d0%5]) with mapi id 15.20.3805.016; Wed, 27 Jan 2021 09:03:30 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, mchehab@kernel.org, a.hajda@samsung.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@siol.net, kishon@ti.com, vkoul@kernel.org Subject: [PATCH v3 11/14] dt-bindings: display: bridge: Add i.MX8qm/qxp LVDS display bridge binding Date: Wed, 27 Jan 2021 16:51:25 +0800 Message-Id: <1611737488-2791-12-git-send-email-victor.liu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611737488-2791-1-git-send-email-victor.liu@nxp.com> References: <1611737488-2791-1-git-send-email-victor.liu@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:54::13) To VI1PR04MB3983.eurprd04.prod.outlook.com (2603:10a6:803:4c::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:54::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3805.16 via Frontend Transport; Wed, 27 Jan 2021 09:03:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 75cd2a5e-f66e-445e-ea89-08d8c2a26a4a X-MS-TrafficTypeDiagnostic: VI1PR04MB2975: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3sGrB5IYTubwRxyJrHndxhDyhsJohjTg3xjrRqdvQoYL+Vr6INPFSxKShH1aJwUxdGMgR1Sj1d5cAUin+UAWbDwchoMxDgh9ZlKQzD0cI54qCXlVdTHPnid96bvMYClS+M1IGaESsG/xLvncrmcgxTlTDrtXF7nY5VrHQI/VsbBi9VBR7nJAC0BU+IsoS7f4bd7jNkmmMKTZaqBwoGnnWfvp190sKglCLCgZQQ7XH88kE1Ypf2+PXT6ezcR+WmcAOWBieWa1wWa4eCXk5sxiHnyXlaxNtcVPzpffLKRGFRNJ/Gfb2XejbnV+5XBqtB+PwxtmcmkokjxPAnb7wD9/mMcAskiZUR59rLZ5UZe6hdobqI6MU1T7SPO0yl4jOgmpo6ZExC16+2CZSPb1ajf/MChlR3JWKrv8piyNby0C/d9kqthD2wI+mgbbTYBqS0IbnafuHUyEiz2RTrvqY84ACJg3qjkIH3BltPkb3aWyytQaqeOa8QaA55pDvDplIhPSvsW28WcrD9csrHBDFS6V4Grm6NxzUZjsELQuZ1e1iwJsXNLsD1omx7nw+W54Detmo0KMfKutbmEz309l4C9eYo6Gll5ahrrRAkDluKxwiHDer9nZidlkutzxpj+G5tACKGFFx46Ip/pBMJ96uRxnfw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB3983.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(366004)(346002)(39860400002)(136003)(396003)(8936002)(2616005)(6486002)(66946007)(186003)(956004)(7416002)(4326008)(36756003)(69590400011)(6506007)(8676002)(316002)(5660300002)(16526019)(86362001)(478600001)(6512007)(2906002)(52116002)(83380400001)(66556008)(966005)(26005)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: srCXo5eXpyoxM0CSZVro+DFydAhLFiizrDS2U5/4QaJ3OnONUPZKW3nLSW9jETQ4Uz+7Pn+h0ptJyHJEAutliopMpRwIuty+hI3l6qfhWwOgV2ftk4tR9vwcuKXRuHPjDDCV+8XTMmdw9Pig1jqjZHbC8jxpbcp8ZQSOAuoUvUegN3/o+Plk6nHeVVjisXulewT/KkZBLdVjlzNjMyJI4OzOMCh/tXp/hPouc/vzomTzBX6Qmvfy8sf4zlpSsqkW7nhQ+kNMgn4KYiw1QHbiYi4Zxaxl41P0VzCf24jZ4bQHCaPa8gFv2116p2z8IFl8RmSXtZoIuIC1fbU189qqZrGlP1ZFsUW7fuqPrY3ib+uMh0Ad7bxZ+UrX06BfZqE032GJYFrzH11+h8oovyhW7M3AMfUTppRvuJaw1yCWiKbziEE4wiOObt05krz4dICeZy+1x/CF6wtfvobXxPrqhy+VTTdJ53vkfzQFbnnnrLy8YG+mKNx9lj2on0fPfZ30qtLSVBOkoL5VZhcOpO0r4NhDl8dZYVygooL8gxi4xhiXR8kHJpGcyud9hcIpzU/0aOnuCq2ROKLGcnRi1uc/WCuw32sGepQLuU3hj7Dx0K326OJ6sRfKXEDdqXG1l0cHK2KtuoSS6gxjxN0X8YVQf1CxsWpzdCrjgejW8BXP4cE4afI3JlRnBh7vyX0vWc+7xwY0gqgT+sPcyH/KiWz+waFu4sj3dR103ZNwJeiF+mMyJlkMwcA/DMRuDizvqckHwNP0xvpUcsf3JpPWv0vwu5sf/A+vTly6XcAZleMAti87YA8eW47dmpsXoLXPwmPF9GyJiNxrij2eCvKW+9j9DSZaKCePpggy/7fE6wXC8jeSacE879/ogXDJ8vWQ++zjAkzT0Nrm1pGgUWJCX+s12Mtx9MtaGa1q6aEEil5kh4Ljc3dRzhxlyz9b+haqjGloy5pVf5wJKkMKHEEcU4l/WLbzm3S3a5tbWbD3z+oxqNJR+7kxOsSI2z0ExjjULfMnQB1AmmhxJIHnUXYk9D5fJ7QPsfT+2rqLNY5ssFNg9hjIMTl9NXXGbsh8L1uVByd0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75cd2a5e-f66e-445e-ea89-08d8c2a26a4a X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB3983.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2021 09:03:30.2397 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MscLWDfOoKaLe1eaAhZuSupvhRgYO2dDo+aScR9RDCX95t5b+aK4Oh5pJm5Y3UosLW9+ilrwXwm5W+awbUdhfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB2975 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This patch adds bindings for i.MX8qm/qxp LVDS display bridge(LDB). Signed-off-by: Liu Ying Reviewed-by: Rob Herring --- v2->v3: * Drop 'fsl,syscon' property. (Rob) * Mention the CSR module controls LDB. v1->v2: * Use graph schema. (Laurent) * Side note i.MX8qxp LDB official name 'pixel mapper'. (Laurent) .../bindings/display/bridge/fsl,imx8qxp-ldb.yaml | 173 +++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml b/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml new file mode 100644 index 00000000..9454300 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml @@ -0,0 +1,173 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/fsl,imx8qxp-ldb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qm/qxp LVDS Display Bridge + +maintainers: + - Liu Ying + +description: | + The Freescale i.MX8qm/qxp LVDS Display Bridge(LDB) has two channels. + + The i.MX8qm/qxp LDB is controlled by Control and Status Registers(CSR) module. + The CSR module, as a system controller, contains the LDB's configuration + registers. + + For i.MX8qxp LDB, each channel supports up to 24bpp parallel input color + format and can map the input to VESA or JEIDA standards. The two channels + cannot be used simultaneously, that is to say, the user should pick one of + them to use. Two LDB channels from two LDB instances can work together in + LDB split mode to support a dual link LVDS display. The channel indexes + have to be different. Channel0 outputs odd pixels and channel1 outputs + even pixels. + + For i.MX8qm LDB, each channel additionally supports up to 30bpp parallel + input color format. The two channels can be used simultaneously, either + in dual mode or split mode. In dual mode, the two channels output identical + data. In split mode, channel0 outputs odd pixels and channel1 outputs even + pixels. + + A side note is that i.MX8qm/qxp LDB is officially called pixel mapper in + the SoC reference manuals. The pixel mapper uses logic of LDBs embedded in + i.MX6qdl/sx SoCs, i.e., it is essentially based on them. To keep the naming + consistency, this binding calls it LDB. + +properties: + compatible: + enum: + - fsl,imx8qm-ldb + - fsl,imx8qxp-ldb + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + clocks: + items: + - description: pixel clock + - description: bypass clock + + clock-names: + items: + - const: pixel + - const: bypass + + power-domains: + maxItems: 1 + + fsl,companion-ldb: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + A phandle which points to companion LDB which is used in LDB split mode. + +patternProperties: + "^channel@[0-1]$": + type: object + description: Represents a channel of LDB. + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + reg: + description: The channel index. + enum: [ 0, 1 ] + + phys: + description: A phandle to the phy module representing the LVDS PHY. + maxItems: 1 + + phy-names: + const: lvds_phy + + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Input port of the channel. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Output port of the channel. + + required: + - "#address-cells" + - "#size-cells" + - reg + - phys + - phy-names + + additionalProperties: false + +required: + - compatible + - "#address-cells" + - "#size-cells" + - clocks + - clock-names + - power-domains + - channel@0 + - channel@1 + +allOf: + - if: + properties: + compatible: + contains: + const: fsl,imx8qm-ldb + then: + properties: + fsl,companion-ldb: false + +additionalProperties: false + +examples: + - | + #include + ldb { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx8qxp-ldb"; + clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_MISC2>, + <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_BYPASS>; + clock-names = "pixel", "bypass"; + power-domains = <&pd IMX_SC_R_LVDS_0>; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + phys = <&mipi_lvds_0_phy>; + phy-names = "lvds_phy"; + + port@0 { + reg = <0>; + + mipi_lvds_0_ldb_ch0_mipi_lvds_0_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch0>; + }; + }; + }; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + phys = <&mipi_lvds_0_phy>; + phy-names = "lvds_phy"; + + port@0 { + reg = <0>; + + mipi_lvds_0_ldb_ch1_mipi_lvds_0_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch1>; + }; + }; + }; + };