Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4471569imm; Wed, 30 May 2018 06:21:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ3B85PnzpYqKrpgXc/LHOKfAGuSVhz4/o5XLpvt7vvFqwyQj70tHCJNgtMhp/x789laulI X-Received: by 2002:a63:3807:: with SMTP id f7-v6mr2244791pga.446.1527686481932; Wed, 30 May 2018 06:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527686481; cv=none; d=google.com; s=arc-20160816; b=y7G2ZVOqmoQY/MGvJ35xcPyloodfa2I5iNbkC3q9/xifjEhQcvf1AecSw1u6IkZQ1u Eb/NZrMviv95usNUp32ZUgAStuYl7ICca9wKajam3KRy9d+pGmYf2ITNlhOIYnsMH2LO 76Uv0tcHzCVRv0H+n1Wn4JkJCJRHDuEcxwlmb0ualoOkeYy677+OhvTlljHP3f44X7DC H8zdT3V5wiSgvu+qEjW4d8C0OW2PDd9OyFuijZlxoDGP76dpbc5/kHVXFdyuNAvMgp67 UmItOKC+jgc3DNwpn/oapFJs0NsmET392Hjdo5hVMCuEDogUX6m8hu10uDE37c1OZ2oh JMAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=fW3uW7MxxQJtqSmnYoP47lN+bQn72xA9siqXnz/GGR4=; b=po2XbkA5t4xa1VtvJBycz8wU3/Fx6CMyMx3vnjreaOkf61QP+tnMqnHT6EtR7+QLFl 7H6mpElBzSZIeOj/By5RvjuqHaEVJhp2+vQZbjzk4kzQmgb3fxYI4BQjeNHPdWzFvuiT O1NcswBjgYbjrsuXn7ZUvtWzxFN9hb1jlHzX4ZoL88rBoRfexVU3UEioJLQ50SRKAyU0 XOZD6BlfPv9LhYCtBbbs3zD1THedcypHFb1zl304iuJc8uQAvFi3IEdy9pVD21t7bz6x X6WEISNpEtgaVOG5RyAbOZvfDCMQ5Hk6gg5QcH5svgHcnVmzZV+bMS1OzsXPHlODfxF+ 1bEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=JAINv08M; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4-v6si33923585plt.561.2018.05.30.06.21.07; Wed, 30 May 2018 06:21:21 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=JAINv08M; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753488AbeE3NUa (ORCPT + 99 others); Wed, 30 May 2018 09:20:30 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:52048 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752852AbeE3NUO (ORCPT ); Wed, 30 May 2018 09:20:14 -0400 Received: from avalon.localnet (unknown [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B94E01AAC; Wed, 30 May 2018 15:20:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1527686411; bh=EhSw/X8N01q8QvTYhBnumSoh1TAn2lnY7SCcvEN39z8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JAINv08M5q1n2X9Fl6qSWRr/yRNS8Bd/dGhqEIqKF5PwtL3euzLrOl6rZFWVh6kzo AcB+MqEiSewchximneQtvwDE63Gh4dEswp8uhfmUkdTOY02v+aB9Hui4+gtNr0VkSt +7SK6Ra0/drTBrIzF6EA4KaYvbvm0gqpAHMfcvpM= From: Laurent Pinchart To: Andrzej Hajda Cc: Maciej Purski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Rob Herring , Mark Rutland , Thierry Reding , Kukjin Kim , Krzysztof Kozlowski , Archit Taneja , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Marek Szyprowski , Bartlomiej Zolnierkiewicz Subject: Re: [PATCH 07/12] dt-bindings: tc358754: add DT bindings Date: Wed, 30 May 2018 16:20:15 +0300 Message-ID: <2964003.icRy2MNiaL@avalon> Organization: Ideas on Board Oy In-Reply-To: <20180530130731eucas1p160d53c3f8500bcecd000bd8895843817~zbgGgQw3b1079710797eucas1p1H@eucas1p1.samsung.com> References: <1527500833-16005-1-git-send-email-m.purski@samsung.com> <1928297.lKUBOH9NhR@avalon> <20180530130731eucas1p160d53c3f8500bcecd000bd8895843817~zbgGgQw3b1079710797eucas1p1H@eucas1p1.samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrzej, On Wednesday, 30 May 2018 16:07:29 EEST Andrzej Hajda wrote: > On 30.05.2018 14:35, Laurent Pinchart wrote: > > On Wednesday, 30 May 2018 12:59:12 EEST Andrzej Hajda wrote: > >> On 28.05.2018 12:18, Laurent Pinchart wrote: > >>> On Monday, 28 May 2018 12:47:11 EEST Maciej Purski wrote: > >>>> The patch adds bindings to Toshiba DSI/LVDS bridge TC358764. > >>>> Bindings describe power supplies, reset gpio and video interfaces. > >>>> > >>>> Signed-off-by: Andrzej Hajda > >>>> Signed-off-by: Maciej Purski > >>>> --- > >>>> > >>>> .../bindings/display/bridge/toshiba,tc358764.txt | 42 > >>>> ++++++++++++++++ > >>>> 1 file changed, 42 insertions(+) > >>>> create mode 100644 > >>>> > >>>> Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt > >>>> > >>>> diff --git > >>>> a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt > >>>> b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt > >>>> new > >>>> file mode 100644 > >>>> index 0000000..d09bdc2 > >>>> --- /dev/null > >>>> +++ > >>>> b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt > >>>> @@ -0,0 +1,42 @@ > >>>> +TC358764 MIPI-DSI to LVDS panel bridge > >>>> + > >>>> +Required properties: > >>>> + - compatible: "toshiba,tc358764" > >>>> + - reg: the virtual channel number of a DSI peripheral > >>>> + - vddc-supply: core voltage supply > >>>> + - vddio-supply: I/O voltage supply > >>>> + - vddmipi-supply: MIPI voltage supply > >>>> + - vddlvds133-supply: LVDS1 3.3V voltage supply > >>>> + - vddlvds112-supply: LVDS1 1.2V voltage supply > >>> > >>> That's a lot of power supplies. Could some of them be merged together ? > >>> See https://patchwork.freedesktop.org/patch/216058/ for an earlier > >>> discussion on the same subject. > >> > >> Specs says about 3 supply voltage values: > >> - 1.2V - digital core, DSI-RX PHY > >> - 1.8-3.3V - digital I/O > >> - 3.3V - LVDS-TX PHY > >> > >> So I guess it should be minimal number of supplies. Natural candidates: > >> > >> - vddc-supply: core voltage supply, 1.2V > >> - vddio-supply: I/O voltage supply, 1.8V or 3.3V > >> - vddlvds-supply: LVDS1/2 voltage supply, 3.3V > >> > >> I have changed name of the latest supply to be more consistent with > >> other supplies, and changed 1.8-3.3 (which incorrectly suggest voltage > >> range), to more precise voltage alternative. > > > > This looks fine to me. > > > >>>> + - reset-gpios: a GPIO spec for the reset pin > >>>> + > >>>> +The device node can contain zero to two 'port' child nodes, each with > >>>> one > >>>> +child > >>>> +'endpoint' node, according to the bindings defined in [1]. > >>>> +The following are properties specific to those nodes. > >>>> + > >>>> +port: > >>>> + - reg: (required) can be 0 for DSI port or 1 for LVDS port; > >>> > >>> This seems pretty vague to me. It could be read as meaning that ports > >>> are > >>> completely optional, and that the port number you list can be used, but > >>> that something else could be used to. > >>> > >>> Let's make the port nodes mandatory. I propose the following. > >>> > >>> Required nodes: > >>> > >>> The TC358764 has DSI and LVDS ports whose connections are described > >>> using > >>> the OF graph bindings defined in > >>> Documentation/devicetree/bindings/graph.txt. The device node must > >>> contain > >>> one 'port' child node per DSI and LVDS port. The port nodes are numbered > >>> as follows. > >>> > >>> Port Number > >>> > >>> ------------------------------------------------------------------- > >>> > >>> DSI Input 0 > >>> LVDS Output 1 > >>> > >>> Each port node must contain endpoint nodes describing the hardware > >>> connections. > >> > >> Since the bridge is controlled via DSI bus, DSI input port is not > >> necessary. > > > > I don't agree with this. Regardless of how the bridge is controlled, I > > think we should always use ports to describe the data connections. > > Otherwise it would get more complicated for display controller drivers to > > use different types of bridges. > > It was discussed already, and DT guideline is to skip graphs in simple > case of parent/child nodes, see for example [1]. > > [1]: https://marc.info/?l=dri-devel&m=148354108702517&w=2 That's when the child as no other connection at all. I don't think it makes sense to mix description of connections through parent/child relationships and through ports for a single device. And that being said, I don't agree with Rob's comment there. Having two different methods to describe connections means that you have to implement them both in all display controller drivers (and even all bridge drivers in the case of chained bridges). That's an extra complexity that can easily be avoided by standardizing DT bindings. I also wonder whether Rob's position hasn't been reconsidered since then; I vaguely recalled another more recent discussion on this topic. I'm a bit too busy now to try and dig it up now I'm afraid :-/ > >>>> +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt > >>>> + > >>>> +Example: > >>>> + > >>>> + bridge@0 { > >>>> + reg = <0>; > >>>> + compatible = "toshiba,tc358764"; > >>>> + vddc-supply = <&vcc_1v2_reg>; > >>>> + vddio-supply = <&vcc_1v8_reg>; > >>>> + vddmipi-supply = <&vcc_1v2_reg>; > >>>> + vddlvds133-supply = <&vcc_3v3_reg>; > >>>> + vddlvds112-supply = <&vcc_1v2_reg>; > >>>> + reset-gpios = <&gpd1 6 GPIO_ACTIVE_LOW>; > >>>> + #address-cells = <1>; > >>>> + #size-cells = <0>; > >>>> + port@1 { > >>>> + reg = <1>; > >>>> + lvds_ep: endpoint { > >>>> + remote-endpoint = <&panel_ep>; > >>>> + }; > >>>> + }; > >>>> + }; -- Regards, Laurent Pinchart