Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3076495ybl; Sun, 8 Dec 2019 06:51:44 -0800 (PST) X-Google-Smtp-Source: APXvYqyUFLZDadOuexuZD7aHftodtjPgdmAwyx2odLWdOATHeaPv2YoVcDn/O1bOItAi0aYCyk16 X-Received: by 2002:a9d:5c1:: with SMTP id 59mr18391905otd.192.1575816704730; Sun, 08 Dec 2019 06:51:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575816704; cv=none; d=google.com; s=arc-20160816; b=YR+j7XHw++ecQ3v0KlkpdFXClYatbsdFHneEajnn6+TtqP8S+U/QUFxftl3bQVgHEi g7w5qc8+vWji+qr9tKi6r5DiL24r5SYkNXhpdS4MoCHIMiKo+tSa5wbeJPc64pdxAveD aaF5bO+QzSdpSm3MnBOey4LhrDVZmU6PDAIkDd1pzcan23hmD7DXZcQ/HRXF7a/rqQ58 CKovm6NwM1Tv5AzMVCzcpbSfm2W1pM3T+as7tBAuhnuFWPgAw4JMdbVwc09MwZ1W00ue mLUYB5xLeS4GLbVWGrIx7sJ4/qlgBfQTqLo4jihvwdKGjKDuAisVxF+xUJrg5yT6JU/B jjXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ylORmeKGcMDOslBYGE083UKx6zdDm+TxfqEW7GPS3D8=; b=pYo5IQkzwSaI8U4GNte8nMj+O1WIR/4NF3b9KHJSjtFfwL7GzZbRX/Bog5xtSPUbYM 0F9m3KpekJFGFsP7i3fpZtuHFLJW86Yo4Cph8rRnXi7f22B/tyT2r9B0ehyeXmrj0cfD FplwqkaVpwOUIP9HDV6ygYtOZIeRud1tbG4RSvulvSy3fQV0qAm0eHvAa3VPwWaibUJg btjmJ2/WmoFYHVUGMgv/CbQJ/Wx5SIxMmyhB3mbkxFEOp8yI0zfeiie2CRoL5d6KtcOs QH9vAjkliPsm/8uJZD7lOkQwtqFoM/mD7uzyakcHLaT73eavkCRTjl8gQoAl+F1X13U4 766w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=S88xWFm+; 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 g17si10423916otk.252.2019.12.08.06.51.02; Sun, 08 Dec 2019 06:51:44 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=S88xWFm+; 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 S1726508AbfLHOpq (ORCPT + 99 others); Sun, 8 Dec 2019 09:45:46 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:43138 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725957AbfLHOpq (ORCPT ); Sun, 8 Dec 2019 09:45:46 -0500 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7763052B; Sun, 8 Dec 2019 15:45:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1575816341; bh=QD0nTIwYIQ9eKjfuPVhANN19JX+df8dsKi9/tNgpjS4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S88xWFm+BS6wZu2nytTO2r9us6YdrHtGx7/CiK3Ya4cqhiFMf9vmBGbqxnRUZ1lFd 1Qq68Dndwj0RKUTAbIJuUHHSClZ552S3xJ0du/0Plr6+N28nELT+TnBp51/XNkCVGH YvqgPVqvmMAL4VN8UG8QQXgADkPA+DPoiA3pHLCI= Date: Sun, 8 Dec 2019 16:45:33 +0200 From: Laurent Pinchart To: Rob Clark Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, aarch64-laptops@lists.linaro.org, Vasily Khoruzhick , Bjorn Andersson , Jeffrey Hugo , Rob Clark , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [PATCH 1/4] dt-bindings: display: panel: document panel-id Message-ID: <20191208144533.GA14311@pendragon.ideasonboard.com> References: <20191207203553.286017-1-robdclark@gmail.com> <20191207203553.286017-2-robdclark@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191207203553.286017-2-robdclark@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Thank you for the patch. On Sat, Dec 07, 2019 at 12:35:50PM -0800, Rob Clark wrote: > From: Rob Clark > > For devices that have one of several possible panels installed, the > panel-id property gives firmware a generic way to locate and enable the > panel node corresponding to the installed panel. Example of how to use > this property: > > ivo_panel { > compatible = "ivo,m133nwf4-r0"; > panel-id = <0xc5>; > status = "disabled"; > > ports { > port { > ivo_panel_in_edp: endpoint { > remote-endpoint = <&sn65dsi86_out_ivo>; > }; > }; > }; > }; > > boe_panel { > compatible = "boe,nv133fhm-n61"; > panel-id = <0xc4>; > status = "disabled"; > > ports { > port { > boe_panel_in_edp: endpoint { > remote-endpoint = <&sn65dsi86_out_boe>; > }; > }; > }; > }; > > sn65dsi86: bridge@2c { > compatible = "ti,sn65dsi86"; > > ports { > #address-cells = <1>; > #size-cells = <0>; > > port@0 { > reg = <0>; > sn65dsi86_in_a: endpoint { > remote-endpoint = <&dsi0_out>; > }; > }; > > port@1 { > reg = <1>; > > sn65dsi86_out_boe: endpoint@c4 { > remote-endpoint = <&boe_panel_in_edp>; > }; > > sn65dsi86_out_ivo: endpoint@c5 { > remote-endpoint = <&ivo_panel_in_edp>; > }; > }; > }; > }; > > Signed-off-by: Rob Clark > --- > .../bindings/display/panel/panel-common.yaml | 26 +++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml > index ef8d8cdfcede..6113319b91dd 100644 > --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml > +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml > @@ -75,6 +75,32 @@ properties: > in the device graph bindings defined in > Documentation/devicetree/bindings/graph.txt. > > + panel-id: > + description: > + To support the case where one of several different panels can be installed > + on a device, the panel-id property can be used by the firmware to identify > + which panel should have it's status changed to "ok". This property is not > + used by the HLOS itself. If your firmware can modify the status property of a panel, it can also add DT nodes. As discussed before, I don't think this belongs to DT. Even if panel-id isn't used by the operating system, you have Linux kernel patches in this series that show that this isn't transparent. This needs to be handled in the firmware (or, if not possible, in a kernel board driver). The above DT fragment, visible to the kernel, doesn't describe the actual hardware. Furthermore, you would require all bridge drivers to be patched to support this method, which shows again that the issue isn't handled in the right place. Finally, unless I'm mistaken, this series is meant to support display for an ACPI-based ARM machine. Using DT as a stop-gap measure because ACPI support isn't there yet is fine out-of-tree, and fine by me in-tree provided that the DT bindings are clean, but not when DT is abused like this. I'm sorry, but this is a NACK from me. Please handle this transparently in the firmware if you want DT-based boot, or with ACPI. > + > + For a device with multiple potential panels, a node for each potential > + should be defined with status = "disabled", and an appropriate panel-id > + property. The video data producer should be setup with endpoints going to > + each possible panel. The firmware will find the dt node with a panel-id > + matching the actual panel installed, and change it's status to "ok". > + > + The exact method the firmware uses to determine the panel-id of the installed > + panel is outside the scope of this binding, but a few examples are > + > + 1) u-boot module reading a value from a u-boot env var > + 2) EFI driver module reading a value from an EFI variable > + 3) device specific firmware reading some device specific GPIOs or > + e-fuse > + > + The panel-id values are an opaque integer. They can be sparse. The only > + important thing is that each possible panel in the system has a unique > + panel-id, and that the values configured in the device's DTB match the > + values that the firmware is looking for. > + > ddc-i2c-bus: > $ref: /schemas/types.yaml#/definitions/phandle > description: -- Regards, Laurent Pinchart