Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5128874ybl; Tue, 10 Dec 2019 00:38:24 -0800 (PST) X-Google-Smtp-Source: APXvYqx82lJjsBH3ahTJghIUcyI28dbxQoo3SoQSMVzzfNVWVa5nMJIjRPDn4DFOyX5rpCHXhBY3 X-Received: by 2002:a05:6830:1615:: with SMTP id g21mr25921946otr.49.1575967104017; Tue, 10 Dec 2019 00:38:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575967104; cv=none; d=google.com; s=arc-20160816; b=rSEgR6uVI0d7j68ZYIGSrLXwGnVPC+Kvj9DEKQlQ2FlcB4nbI9uy28eMfmV40v35yj 38r1ZXm6IkXtkcI0smVgC2KiEXzh79eSFQMKsWtUsETZ2hhAzZ0XLRQsuMg3+BItvjwX Tya52rE0hwhKAVyyfF1GAg8toB6PL6LApgUk532jVyDtMoYwUeQVh2IF/Df0LkDZVhjS +08T4JcJReWuBx8uwMPrEcMw5+Nwb4mCAdy8fQAeuvhlnRwXAVanTsxa9R5GyCmZa1P4 rJgd0uJEAwrIDgkInCoacuIxxJaosyTCAoIn+HDihOGRXu0KcSqQ3O5Z/OGq4NMfrS/v HDRw== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=O3M2kUIZvh1y7QnzVDJ72RW9/rxyHw9ji71B/UMwuh4=; b=XG66rSycg9a+u4Eu8fY6ncgXc5/g8+xmabMIj6e23Hlep+Mgb/FHV8uEaXb/UhN6An zQ1MMlkF8pKyQrLMZSI7wU7RbDOkLOZNzf2z2QIKbIo9i/2dMR9DbCXjHQ6Umb7zlHGm n5h8EEBpzmbMwhpw/FXTa/CatzmLDowBXr3mGIHq7eCTHQQR4a6J7b35aYmYV4TnquN2 ybTnh0ZFTkbCpFNKyofYq2xELfLHYWsxOeojJQsjF/HFrr12xpgJjCRlzZ0eZ9qIhUlD 2WPTdV2A2o+KOu8KSiksJ6adjRXs1XNYTznweRoBAHrTbMsvkTETcV5qW/yzB2t78g12 cVcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S44Wn2T5; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si1448143oih.89.2019.12.10.00.38.11; Tue, 10 Dec 2019 00:38:24 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=S44Wn2T5; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727207AbfLJIhG (ORCPT + 99 others); Tue, 10 Dec 2019 03:37:06 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39155 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726847AbfLJIhE (ORCPT ); Tue, 10 Dec 2019 03:37:04 -0500 Received: by mail-pg1-f196.google.com with SMTP id b137so8553300pga.6 for ; Tue, 10 Dec 2019 00:37:03 -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; bh=O3M2kUIZvh1y7QnzVDJ72RW9/rxyHw9ji71B/UMwuh4=; b=S44Wn2T5PcoqwaV3CVGoQ1DX9MYFHbLY8nvZt/g3ehUarxNrT2OSCdpjgUyTFPJwYR HmAJpQ2csDJi5yEBjb0YCWsYeAqXZlP2zOZmmD0y3asMy+6lmU70hwyPNBFOUgaNNEE0 VTT4yqPiUiIXV+OeRrYBApkok60cYKDOQmDseZz/yNWXMfCjAy/dJTYmYU60yksY8p2Z s04xPejKe3eUmxzXKwnoNH24oCbbVZWmrx5O8y/LYwKDmqRoD7rpiR0h7KVYOnccqU2k FL/qkSC/026aXibE0xe0nccjQ4Aa+Bz5cQYw5TUMcHV0R+jxqrkKSSleaQz5xSR11RD+ 7zxQ== 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; bh=O3M2kUIZvh1y7QnzVDJ72RW9/rxyHw9ji71B/UMwuh4=; b=F7UxTvZlNUZEv4T0me5wvkFP2Kcn2SDoKE3U/Sj3YDnClo41kYykrbnNpn80MbSgnI HKD9Oxny7q1OmIEIMNqgFGnOQw7u/Bu3aOGntmEcOn6zZudqSiKvD6Zx4YCSKHQiVkUM RbsZ2rcEGXzchT44Yo5o3rZAV4hxW2445vISuBEBKW7d5e+sP+RZK4KJmIt9QEoouvnQ dp6zT6sE6lth3MNC7hrfQQLzoDZxDS5e3aN5H0ZGlXGBn2kxBgXWw8GuvoJaSNJJ1EyQ G16+4o7p99440HOn0KZXvZg+lUCeM26IBuZr3CGh1csc3H+dLbOusyblJ1LNUDSNoGCK CWTA== X-Gm-Message-State: APjAAAVmNASsvgYQ+l85kEnoH+6XTQjf3WZsECef3jW87qW879ZWXDhQ JNn4644BpaUIaZ9eEPGM9eM= X-Received: by 2002:a63:f5c:: with SMTP id 28mr23720083pgp.348.1575967023390; Tue, 10 Dec 2019 00:37:03 -0800 (PST) Received: from nj08008nbu.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id y128sm2246632pfg.17.2019.12.10.00.36.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Dec 2019 00:37:02 -0800 (PST) From: Kevin Tang To: airlied@linux.ie, daniel@ffwll.ch, kevin3.tang@gmail.com Cc: orsonzhai@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH RFC 5/8] dt-bindings: display: add Unisoc's mipi dsi&dphy bindings Date: Tue, 10 Dec 2019 16:36:32 +0800 Message-Id: <1575966995-13757-6-git-send-email-kevin3.tang@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1575966995-13757-1-git-send-email-kevin3.tang@gmail.com> References: <1575966995-13757-1-git-send-email-kevin3.tang@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kevin Tang Adds MIPI DSI Master and MIPI DSI-PHY (D-PHY) support for Unisoc's display subsystem. Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Signed-off-by: Kevin Tang --- .../devicetree/bindings/display/sprd/dphy.txt | 49 ++++++++++++++++ .../devicetree/bindings/display/sprd/dsi.txt | 68 ++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/sprd/dphy.txt create mode 100644 Documentation/devicetree/bindings/display/sprd/dsi.txt diff --git a/Documentation/devicetree/bindings/display/sprd/dphy.txt b/Documentation/devicetree/bindings/display/sprd/dphy.txt new file mode 100644 index 0000000..474c2b2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/sprd/dphy.txt @@ -0,0 +1,49 @@ +Unisoc MIPI DSI-PHY (D-PHY) +============================================================================ + +Required properties: + - compatible: value should be "sprd,dsi-phy". + - reg: must be the dsi controller base address. + - #address-cells, #size-cells: should be set respectively to <1> and <0> + +Video interfaces: + Device node can contain video interface port nodes according to [1]. + The following are properties specific to those nodes: + + port node inbound: + - reg: (required) must be 0. + port node outbound: + - reg: (required) must be 1. + + endpoint node connected from DSI controller node (reg = 0): + - remote-endpoint: specifies the endpoint in DSI node. + endpoint node connected to panel node (reg = 1): + - remote-endpoint: specifies the endpoint in panel node. + +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt + + +Example: + + dphy: dphy { + compatible = "sprd,dsi-phy"; + reg = <0x0 0x63100000 0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + /* input port*/ + port@1 { + reg = <1>; + dphy_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + + /* output port */ + port@0 { + reg = <0>; + dphy_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/display/sprd/dsi.txt b/Documentation/devicetree/bindings/display/sprd/dsi.txt new file mode 100644 index 0000000..1719ff5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/sprd/dsi.txt @@ -0,0 +1,68 @@ +Unisoc MIPI DSI Master +============================================================================= + +Required properties: + - compatible: value should be "sprd,dsi-host"; + - reg: physical base address and length of the registers set for the device + - interrupts: should contain DSI interrupt + - clocks: list of clock specifiers, must contain an entry for each required + entry in clock-names + - clock-names: list of clock names sorted in the same order as the clocks + property. + - #address-cells, #size-cells: should be set respectively to <1> and <0> + according to DSI host bindings (see MIPI DSI bindings [1]) + +Optional properties: + - power-domains: a phandle to DSIM power domain node + +Child nodes: + Should contain DSI peripheral nodes (see MIPI DSI bindings [1]). + +Video interfaces: + Device node can contain video interface port nodes according to [2]. + The following are properties specific to those nodes: + + port node inbound: + - reg: (required) must be 0. + port node outbound: + - reg: (required) must be 1. + + endpoint node connected from DPU node (reg = 0): + - remote-endpoint: specifies the endpoint in DPU node. + endpoint node connected to D-PHY node (reg = 1): + - remote-endpoint: specifies the endpoint in D-PHY node. + +[1]: Documentation/devicetree/bindings/display/mipi-dsi-bus.txt +[2]: Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + +SoC specific DT entry: + + dsi: dsi@63100000 { + compatible = "sprd,dsi-host"; + reg = <0 0x63100000 0 0x1000>; + interrupts = , + ; + clock-names = "clk_aon_apb_disp_eb"; + clocks = <&clk_aon_top_gates 2>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + remote-endpoint = <&dpu_out>; + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint@1 { + remote-endpoint = <&dphy_in>; + }; + }; + }; + }; \ No newline at end of file -- 2.7.4