Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp223033pxu; Tue, 1 Dec 2020 09:38:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyKnygsQwCbSot8BATQGXlE+U0KJshgYuDXwnr9iy87dGnBILfphjxVsnQWSi029no+RGyY X-Received: by 2002:a17:906:edb2:: with SMTP id sa18mr3969001ejb.264.1606844338183; Tue, 01 Dec 2020 09:38:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606844338; cv=none; d=google.com; s=arc-20160816; b=zoNYpufD2zwF0cDWesMB1uxMnlreI5V2YBXL1cKQ1rMwq0c8+HRlkt5irpJoEMQM/5 lHUEcO1eItqyAoI+RRsZZQy1OgN/s+KhftcUqqL5neelLvi/4/Am9iZyZufChGY1cfs6 +mMUGmClINNu4ZKIGUaW3cRGkAKjD8ADkPrBxubqU9frkK9jCR8WZHu23MRecgywomDb c9rnIfG7Sp5b2Q/Tlc0kYe0xTQXwIbZsixnx+eqSb4hGN65Dsw54Tja4fIepd8b6vFUj KAENOBKwO96YAoRaNX0Iu6k8wdvUISyDtEKTXupAn6RQ/ITtCx5H5onouWsT0UgbAwL6 o00g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KcI24qnTahs+LZ4IPS5oZs7YMNa4PQSDkHHA9L/rmqw=; b=Pblc9DpwRewLGqKVjXbiYUq6oEDBmzLlQbBszdrzThHsOYKapJpoFADieZs/f2OZ9g CoJ+qJPWorG673yjeCR4Sv04PPtvi3HydPAwdbfa+FMUuSOf+SHtkFS7RbaowVsAqqgJ GRHVBVIPUuMVaGZz26T6pmcIK5yY7UzFwTmURsrGvB6q/p19IOCqrKJTLE4ymGQqJNsA hK+GJfVknIb8JWDGvgAENQWaRu8iExGkvK2UpQrgsberVpkeujgpVx0c3he28GxwYeXJ iB/OF7k0K4p1Vf8K9xxasuPXFVy8VfrcOPKGKi72AP+7Qb87uQiNcvD6ctymDrSVM/qS Q67w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Q9Lj/aho"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s16si309486edt.488.2020.12.01.09.38.33; Tue, 01 Dec 2020 09:38:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Q9Lj/aho"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392022AbgLARf3 (ORCPT + 99 others); Tue, 1 Dec 2020 12:35:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:50298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388186AbgLARf3 (ORCPT ); Tue, 1 Dec 2020 12:35:29 -0500 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6DCD62222E for ; Tue, 1 Dec 2020 17:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606844087; bh=obR+gLukVOK9LenxoCUDYCV+puzsLe1AQixYneEFagQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Q9Lj/ahohD/SF6T5/kn6+YaW1dqpOZ0GqSUvB2P9mGlTGor/XOx2WZAwdgTTvr//D WAyLYPZV8iMZ2VbziIY2C/v6ENvMhICd3Hhvpx47wUL7dC9LDPST1veer8rZNFLbvz cHACQ4+VrEfAhweKvbyjhlYBZEazCtGLKRtQMsCs= Received: by mail-ej1-f44.google.com with SMTP id f23so5790794ejt.8 for ; Tue, 01 Dec 2020 09:34:47 -0800 (PST) X-Gm-Message-State: AOAM532kQhbuF8HcVkliCnuRtm415cO69HDCkmhhjTCbrXRKDE9Sxp/r t9Cm+QoROV+Kp9BwQW5yh2fvdwYoR4CJFrZcGw== X-Received: by 2002:a17:906:a418:: with SMTP id l24mr4039461ejz.360.1606844085258; Tue, 01 Dec 2020 09:34:45 -0800 (PST) MIME-Version: 1.0 References: <1606746513-30909-1-git-send-email-kevin3.tang@gmail.com> <1606746513-30909-6-git-send-email-kevin3.tang@gmail.com> In-Reply-To: From: Rob Herring Date: Tue, 1 Dec 2020 10:34:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/6] dt-bindings: display: add Unisoc's mipi dsi&dphy bindings To: Kevin Tang Cc: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , Mark Rutland , Orson Zhai , Lyra Zhang , "linux-kernel@vger.kernel.org" , dri-devel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 1, 2020 at 6:56 AM Kevin Tang wrote: > > Hi Rob, > > Rob Herring =E4=BA=8E2020=E5=B9=B412=E6=9C=881=E6=97= =A5=E5=91=A8=E4=BA=8C =E4=B8=8A=E5=8D=884:31=E5=86=99=E9=81=93=EF=BC=9A >> >> On Mon, Nov 30, 2020 at 7:29 AM Kevin Tang wrote= : >> > >> > From: Kevin Tang >> > >> > Adds MIPI DSI Master and MIPI DSI-PHY (D-PHY) >> > support for Unisoc's display subsystem. >> > >> > Cc: Orson Zhai >> > Cc: Chunyan Zhang >> > Signed-off-by: Kevin Tang >> > --- >> > .../display/sprd/sprd,sharkl3-dsi-host.yaml | 107 ++++++++++++= +++++++++ >> > .../display/sprd/sprd,sharkl3-dsi-phy.yaml | 84 ++++++++++++= ++++ >> > 2 files changed, 191 insertions(+) >> > create mode 100644 Documentation/devicetree/bindings/display/sprd/spr= d,sharkl3-dsi-host.yaml >> > create mode 100644 Documentation/devicetree/bindings/display/sprd/spr= d,sharkl3-dsi-phy.yaml >> > >> > diff --git a/Documentation/devicetree/bindings/display/sprd/sprd,shark= l3-dsi-host.yaml b/Documentation/devicetree/bindings/display/sprd/sprd,shar= kl3-dsi-host.yaml >> > new file mode 100644 >> > index 0000000..fe0e89d >> > --- /dev/null >> > +++ b/Documentation/devicetree/bindings/display/sprd/sprd,sharkl3-dsi-= host.yaml >> > @@ -0,0 +1,107 @@ >> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> > +%YAML 1.2 >> > +--- >> > +$id: http://devicetree.org/schemas/display/sprd/sprd,sharkl3-dsi-host= .yaml# >> > +$schema: http://devicetree.org/meta-schemas/core.yaml# >> > + >> > +title: Unisoc MIPI DSI Controller >> > + >> > +maintainers: >> > + - Kevin Tang >> > + >> > +properties: >> > + compatible: >> > + const: sprd,sharkl3-dsi-host >> > + >> > + reg: >> > + maxItems: 1 >> > + description: >> > + Physical base address and length of the registers set for the d= evice. >> > + >> > + interrupts: >> > + maxItems: 2 >> > + description: >> > + Should contain DSI interrupt. >> > + >> > + clocks: >> > + minItems: 1 >> > + >> > + clock-names: >> > + items: >> > + - const: clk_src_96m >> > + >> > + power-domains: >> > + maxItems: 1 >> > + description: A phandle to DSIM power domain node >> > + >> > + ports: >> > + type: object >> > + >> > + properties: >> > + "#address-cells": >> > + const: 1 >> > + >> > + "#size-cells": >> > + const: 0 >> > + >> > + port@0: >> > + type: object >> > + description: >> > + A port node with endpoint definitions as defined in >> > + Documentation/devicetree/bindings/media/video-interfaces.tx= t. >> > + That port should be the input endpoint, usually coming from >> > + the associated DPU. >> > + port@1: >> > + type: object >> > + description: >> > + A port node with endpoint definitions as defined in >> > + Documentation/devicetree/bindings/media/video-interfaces.tx= t. >> > + That port should be the output endpoint, usually output to >> > + the associated DPHY. >> > + >> > + required: >> > + - "#address-cells" >> > + - "#size-cells" >> > + - port@0 >> > + - port@1 >> > + >> > + additionalProperties: false >> > + >> > +required: >> > + - compatible >> > + - reg >> > + - interrupts >> > + - clocks >> > + - clock-names >> > + - ports >> > + >> > +additionalProperties: false >> > + >> > +examples: >> > + - | >> > + #include >> > + #include >> > + dsi: dsi@63100000 { >> > + compatible =3D "sprd,sharkl3-dsi-host"; >> > + reg =3D <0x63100000 0x1000>; >> > + interrupts =3D , >> > + ; >> > + clock-names =3D "clk_src_96m"; >> > + clocks =3D <&pll CLK_TWPLL_96M>; >> > + ports { >> > + #address-cells =3D <1>; >> > + #size-cells =3D <0>; >> > + port@0 { >> > + reg =3D <0>; >> > + dsi_in: endpoint { >> > + remote-endpoint =3D <&dpu_out>; >> > + }; >> > + }; >> > + port@1 { >> > + reg =3D <1>; >> > + dsi_out: endpoint { >> > + remote-endpoint =3D <&dphy_in>; >> > + }; >> > + }; >> > + }; >> > + }; >> > diff --git a/Documentation/devicetree/bindings/display/sprd/sprd,shark= l3-dsi-phy.yaml b/Documentation/devicetree/bindings/display/sprd/sprd,shark= l3-dsi-phy.yaml >> > new file mode 100644 >> > index 0000000..b4715d5 >> > --- /dev/null >> > +++ b/Documentation/devicetree/bindings/display/sprd/sprd,sharkl3-dsi-= phy.yaml >> > @@ -0,0 +1,84 @@ >> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> > +%YAML 1.2 >> > +--- >> > +$id: http://devicetree.org/schemas/display/sprd/sprd,sharkl3-dsi-phy.= yaml# >> > +$schema: http://devicetree.org/meta-schemas/core.yaml# >> > + >> > +title: Unisoc MIPI DSI-PHY (D-PHY) >> > + >> > +maintainers: >> > + - Kevin Tang >> > + >> > +properties: >> > + compatible: >> > + const: sprd,sharkl3-dsi-phy >> > + >> > + reg: >> > + maxItems: 1 >> > + description: >> > + Must be the dsi controller base address. >> > + >> > + ports: >> > + type: object >> > + >> > + properties: >> > + "#address-cells": >> > + const: 1 >> > + >> > + "#size-cells": >> > + const: 0 >> > + >> > + port@0: >> > + type: object >> > + description: >> > + A port node with endpoint definitions as defined in >> > + Documentation/devicetree/bindings/media/video-interfaces.tx= t. >> > + That port should be the output endpoint, usually output to >> > + the associated panel. >> > + port@1: >> >> For PHYs, we use the PHY binding, not the graph binding. Please follow >> what practically every other DSI PHY does. > > It seems that the dphy driver does not need to exist alone, so i remove d= phy and dsi graph binding, merge the dphy driver into the dsi driver. Maybe not now, but what about in the future? PHYs tend to change with every process node and digital blocks like the DSI controller may not. If the DPHY is a separate h/w block then it should be a separate node in the DT. Whether you have 1 driver or 2 is independent of the DT binding. Drivers and DT nodes don't have to be 1:1. It's just convenient when they are. Rob