Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3305902ybb; Mon, 6 Apr 2020 06:25:25 -0700 (PDT) X-Google-Smtp-Source: APiQypIcDJibLCV9OTtGpHhm5D5mXcMgWk1sKsfzLIfoJ1DOCGhwq7AzPpa+olNXOM158PBLTHoN X-Received: by 2002:aca:4858:: with SMTP id v85mr12212071oia.51.1586179524934; Mon, 06 Apr 2020 06:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586179524; cv=none; d=google.com; s=arc-20160816; b=kJHE24MverfZwdXtz3J0irMMz+jbtg4G8GJXT4/VUfYaS/gkkDzFYZS5PqiryUUfOW KKveVsItiPV3rfEF9EdmA6wG4Vn8mXI7wXH1ezF+40PJIcsrDBpUn3GnLEuwerQNMdR5 eO9M4gF8JGlfh+77XBK2odLBvieVjJi4jaZ+WNFg6juTsWmrQO1aNqDOh189YPMfLTi7 qmyF9zzZcQclcDliOtL52lhLL985Z6brOfNfsWMiZof6esEioWs0exOHb7WdA5nb8je7 EDQWokgGdbhxJEeAIAtpcZNm1DG8CiUBZFpx7HdjWtfBZkYjhouhlPXMXxbFRDkOt+wo iCKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=DanTUquciw5gJdGRr68CbuDvV90K8/FtLNCj2NX6zgY=; b=aVIqK57fYIOXSMEQHSG4VsZkCimygXRo5oVulHFRjgfb69/oQUIhAcVjO/C9lpBKqp P0f/RSDYIDVgf5KMglZ+ncIMxmVXsVFdchRaReXaf7qp3Sr6HWXdIuqA8fGPC6QhNjqt GMx9Q4CKMk5UTzpKZ6tYHGNkLi14b4oy1/Po9422iHWu+CfZ+MOvttTSB6FaN3mGlASm Vsw0TUzDZESXlubWor3uInsNlpCmwyzHcOt7VIXzhV3WTOBLUwP0kIKdpeioAGEjNi+T CQuVGdjijHQzJoLdLwf6wjFugC5zkO/nUymHXHkqIFQJ4t1VspHZPSmoJLDdSmPEk8KG O5uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b="Utfh/hGa"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190si7650448oib.146.2020.04.06.06.25.13; Mon, 06 Apr 2020 06:25:24 -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; dkim=pass header.i=@synopsys.com header.s=mail header.b="Utfh/hGa"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728314AbgDFNYb (ORCPT + 99 others); Mon, 6 Apr 2020 09:24:31 -0400 Received: from smtprelay-out1.synopsys.com ([149.117.73.133]:37512 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728212AbgDFNYb (ORCPT ); Mon, 6 Apr 2020 09:24:31 -0400 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id EE867404B8; Mon, 6 Apr 2020 13:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1586179470; bh=kt8evzJkOaxQDaYu4nFK9ua9wL2bvCfFsHU7SFJRk2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=Utfh/hGaTGR/ZvuXsODj/Z2c2frvQwPmprQRehI+JxyB8xDLobXD2y2CWWvWxLMAq unj9msBjQrJZh11w881cFY3NeXrPR8a1DJ1IErKIS7K/0QP9DYHPai6IfWvNTzlRjO vezMWo1BDdAMTn8lz36/VJ90wTrsBC3Q6OQI3PGOjCHVyv8u2p1hQAQH3nZVBv9/22 xqpEZy3uqtWxj4ekMd3M+rP+rWi4DnZtA1yyKehN39MBdur7iX/VcZw8eDyMYWeQE9 VqWdEZXlBv24yspK5lMSytGwk7kohYIcDuSW0yaBxi+RN4OSnZJkssyweUZeh0zTgG fHZ/0YHwEeJFA== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id 67430A005D; Mon, 6 Apr 2020 13:24:28 +0000 (UTC) From: Angelo Ribeiro To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch, Gustavo.Pimentel@synopsys.com, Joao.Pinto@synopsys.com Cc: Angelo Ribeiro , Mark Rutland Subject: [PATCH v2 1/4] dt-bindings: display: Add IPK DSI subsystem bindings Date: Mon, 6 Apr 2020 15:24:11 +0200 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add dt-bindings for Synopsys DesignWare MIPI DSI Host and VPG (Video Pattern Generator) support in the IPK display subsystem. The Synopsys DesignWare IPK display video pipeline is composed by a DSI controller (snps,dw-ipk-dsi) and a VPG (snps,dw-ipk-vpg) as DPI stimulus. Typically is used the Raspberry Pi (raspberrypi,7inch-touchscreen-panel) as DSI panel that requires a I2C controller (snps,designware-i2c). Reported-by: Rob Herring Cc: David Airlie Cc: Daniel Vetter Cc: Rob Herring Cc: Mark Rutland Cc: Gustavo Pimentel Cc: Joao Pinto Signed-off-by: Angelo Ribeiro --- .../bindings/display/snps,dw-ipk-dsi.yaml | 162 +++++++++++++++++++++ .../bindings/display/snps,dw-ipk-vpg.yaml | 75 ++++++++++ 2 files changed, 237 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/snps,dw-ipk-dsi.yaml create mode 100644 Documentation/devicetree/bindings/display/snps,dw-ipk-vpg.yaml diff --git a/Documentation/devicetree/bindings/display/snps,dw-ipk-dsi.yaml b/Documentation/devicetree/bindings/display/snps,dw-ipk-dsi.yaml new file mode 100644 index 0000000..92b313c --- /dev/null +++ b/Documentation/devicetree/bindings/display/snps,dw-ipk-dsi.yaml @@ -0,0 +1,162 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/snps,dw-ipk-dsi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Synopsys DesignWare IPK specific extensions for the Synopsys DSI host + controller. + +maintainers: + - Angelo Ribeiro + +description: + The Synopsys DesignWare IPK DSI controller uses the Synopsys DesignWare MIPI + DSI host controller. + For more info please refer to + Documentation/devicetree/bindings/display/bridge/dw_mipi_dsi.txt. + +properties: + compatible: + const: snps,dw-ipk-dsi + + reg: + minItems: 2 + items: + - description: DW MIPI DSI Host registers + - description: DW Phy registers + + reg-names: + items: + - const: dsi + - const: phy + + clocks: + minItems: 2 + maxItems: 3 + items: + - description: Peripheral clock + - description: PLL clock + - description: Pixel clock + + clock-names: + items: + - const: pclk + - const: ref + - const: px_clk + + resets: + minItems: 1 + items: + - description: APB reset line + + reset-names: + items: + - const: apb + + ports: + type: object + description: + A port node as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt and + Documentation/devicetree/bindings/graph.txt. + properties: + port@0: + type: object + description: + Input endpoint of the controller, connects to a DPI source. + + port@1: + type: object + description: + Output endpoint of the controller, connects to a panel or a bridge + input port. + +patternProperties: + "^(panel|panel-dsi)@[0-9]$": + type: object + description: + A node containing the panel or bridge description as defined in + Documentation/devicetree/bindings/display/mipi-dsi-bus.txt. + properties: + port: + type: object + description: + Panel or bridge port node connected to the DSI output port (port@1). + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +required: + - "#address-cells" + - "#size-cells" + - compatible + - reg + - reg-names + - clocks + - clock-names + - reset + - reset-names + - ports + +additionalProperties: false + +examples: + - | + dsi1: dw-ipk-dsi@0x02000 { + compatible = "snps,dw-ipk-dsi"; + reg = <0x02000 0xfff>, <0x05000 0xfff>; + reg-names = "dsi", "phy"; + clocks = <&apb_clk>, <&pll_clk>; + clock-names = "pclk", "ref"; + resets = <&ipk_rst 1>; + reset-names = "apb"; + + #address-cells = <1>; + #size-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi1_in: endpoint@0 { + remote-endpoint = <&vbridge_out>; + }; + }; + + port@1 { + reg = <1>; + dsi_out_port: endpoint { + remote-endpoint = <&panel_dsi_port>; + }; + }; + }; + }; + + i2c@0x01000 { + compatible = "snps,designware-i2c"; + reg = <0x01000 0x100>; + clock-frequency = <400000>; + clocks = <&i2cclk>; + interrupts = <0>; + resets = <&ipk_rst 0>; + reset-names = "i2c"; + + lcd@45 { + compatible = "raspberrypi,7inch-touchscreen-panel"; + reg = <0x45>; + + port { + panel_dsi_port: endpoint { + remote-endpoint = <&dsi_out_port>; + }; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/display/snps,dw-ipk-vpg.yaml b/Documentation/devicetree/bindings/display/snps,dw-ipk-vpg.yaml new file mode 100644 index 0000000..b74b02e --- /dev/null +++ b/Documentation/devicetree/bindings/display/snps,dw-ipk-vpg.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/snps,dw-ipk-vpg.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Synopsys DesignWare Video Pattern Generator (VPG) for MIPI DSI HOST + +maintainers: + - Angelo Ribeiro + +properties: + compatible: + const: snps,dw-ipk-vpg + + reg: + minItems: 2 + items: + - description: Video Pattern Generator registers + - description: Clock generator (MMCM) registers + + reg-names: + items: + - const: vpg + - const: mmcm + + resets: + minItems: 2 + items: + - description: The VPG reset line + - description: The MMCM reset line + + reset-names: + items: + - const: vpg + - const: mmcm + + port: + type: object + description: + Video port for DPI output. + The VPG has one video port for internal DPI stimulus over the MIPI + DSI host controller. + +required: + - compatible + - reg + - reg-names + - resets + - reset-names + - port + +additionalProperties: false + +examples: + - | + dsi_vpg: dw-dsi-vpg@0x03000 { + compatible = "snps,dw-ipk-vpg"; + reg = <0x03000 0xfff>, <0x07000 0xfff>; + reg-names = "vpg", "mmcm"; + resets = <&ipk_rst 2>, <&ipk_rst 3>; + reset-names = "vpg", "mmcm"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + port { + vpg_out: endpoint { + remote-endpoint = <&dsi1_in>; + }; + }; + }; + +... -- 2.7.4