From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752669AbdHDPvl (ORCPT ); Fri, 4 Aug 2017 11:51:41 -0400 Received: from vern.gendns.com ([206.190.152.46]:57821 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752160AbdHDPvk (ORCPT ); Fri, 4 Aug 2017 11:51:40 -0400 Subject: Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels To: Laurent Pinchart , dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org, Mark Rutland , Kevin Hilman , Sekhar Nori , linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org References: <1501799630-1650-1-git-send-email-david@lechnology.com> <1501799630-1650-4-git-send-email-david@lechnology.com> <2434051.fAH1OaXNrL@avalon> From: David Lechner Message-ID: Date: Fri, 4 Aug 2017 10:51:37 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <2434051.fAH1OaXNrL@avalon> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/04/2017 09:54 AM, Laurent Pinchart wrote: > Hi David, > > Thank you for the patch. > > On Thursday 03 Aug 2017 17:33:47 David Lechner wrote: >> This adds a new binding for Sitronix ST7586 display panels. >> >> Using lego as the vendor prefix in the compatible string because the display >> panel I am working with is an integral part of the LEGO MINDSTORMS EV3. >> >> Signed-off-by: David Lechner >> --- >> .../bindings/display/sitronix,st7586.txt | 26 +++++++++++++++++++ >> 1 file changed, 26 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/display/sitronix,st7586.txt >> >> diff --git a/Documentation/devicetree/bindings/display/sitronix,st7586.txt >> b/Documentation/devicetree/bindings/display/sitronix,st7586.txt new file >> mode 100644 >> index 0000000..dfb0b7b >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/display/sitronix,st7586.txt >> @@ -0,0 +1,26 @@ >> +Sitronix ST7586 display panel >> + >> +Required properties: >> +- compatible: "lego,ev3-lcd". >> + >> +The node for this driver must be a child node of a SPI controller, hence >> +all mandatory properties described in ../spi/spi-bus.txt must be specified. >> + >> +Optional properties: >> +- dc-gpios: D/C pin. The presence/absence of this GPIO determines >> + the panel interface operation mode (IF[3:1] pins): >> + - present: IF=011 4-wire 8-bit data serial interface >> + - absent: IF=010 3-wire 9-bit data serial interface > > How does this work ? Do you have a single GPIO on your system connected to > IF[1], with IF[3:2] hardwired to 01 ? LEGO has not made the internals of the display publicly available, so I cannot say for sure. But I assume that IF[3:1] is hardwired to 011. This causes pin D1 to assigned to the signal A0, which is what we are calling the dc gpio here. If IF[3:1] were hardwired to 010, then pin D1 would be not not used and there would be no A0 signal. So, basically, we can infer the state of IF[3:1] by the fact that we have a dc pin or not. > >> +- reset-gpios: Reset pin >> +- power-supply: A regulator node for the supply voltage. >> +- backlight: phandle of the backlight device attached to the panel >> +- rotation: panel rotation in degrees counter clockwise (0,90,180,270) > > Please use the OF graph DT bindings (a.k.a. ports) to describe the connection > between the panel and its source. I am afraid that I do not understand this request. What would the source of the panel be? There is nothing like a SoC LCD controller that is driving this panel. > >> +Example: >> + display@0{ >> + compatible = "lego,ev3-lcd"; >> + reg = <0>; >> + spi-max-frequency = <10000000>; >> + dc-gpios = <&gpio 43 GPIO_ACTIVE_HIGH>; >> + reset-gpios = <&gpio 80 GPIO_ACTIVE_HIGH>; >> + }; > From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Lechner Subject: Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels Date: Fri, 4 Aug 2017 10:51:37 -0500 Message-ID: References: <1501799630-1650-1-git-send-email-david@lechnology.com> <1501799630-1650-4-git-send-email-david@lechnology.com> <2434051.fAH1OaXNrL@avalon> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; Format="flowed" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <2434051.fAH1OaXNrL@avalon> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Laurent Pinchart , dri-devel@lists.freedesktop.org Cc: Mark Rutland , devicetree@vger.kernel.org, Kevin Hilman , Sekhar Nori , linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org T24gMDgvMDQvMjAxNyAwOTo1NCBBTSwgTGF1cmVudCBQaW5jaGFydCB3cm90ZToKPiBIaSBEYXZp ZCwKPiAKPiBUaGFuayB5b3UgZm9yIHRoZSBwYXRjaC4KPiAKPiBPbiBUaHVyc2RheSAwMyBBdWcg MjAxNyAxNzozMzo0NyBEYXZpZCBMZWNobmVyIHdyb3RlOgo+PiBUaGlzIGFkZHMgYSBuZXcgYmlu ZGluZyBmb3IgU2l0cm9uaXggU1Q3NTg2IGRpc3BsYXkgcGFuZWxzLgo+Pgo+PiBVc2luZyBsZWdv IGFzIHRoZSB2ZW5kb3IgcHJlZml4IGluIHRoZSBjb21wYXRpYmxlIHN0cmluZyBiZWNhdXNlIHRo ZSBkaXNwbGF5Cj4+IHBhbmVsIEkgYW0gd29ya2luZyB3aXRoIGlzIGFuIGludGVncmFsIHBhcnQg b2YgdGhlIExFR08gTUlORFNUT1JNU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1ncGlvcyA9IDwmZ3BpbyA4MCBHUElPX0FDVElWRV9ISUdIPjsKPj4gKwl9Owo+IAoK X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: david@lechnology.com (David Lechner) Date: Fri, 4 Aug 2017 10:51:37 -0500 Subject: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels In-Reply-To: <2434051.fAH1OaXNrL@avalon> References: <1501799630-1650-1-git-send-email-david@lechnology.com> <1501799630-1650-4-git-send-email-david@lechnology.com> <2434051.fAH1OaXNrL@avalon> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 08/04/2017 09:54 AM, Laurent Pinchart wrote: > Hi David, > > Thank you for the patch. > > On Thursday 03 Aug 2017 17:33:47 David Lechner wrote: >> This adds a new binding for Sitronix ST7586 display panels. >> >> Using lego as the vendor prefix in the compatible string because the display >> panel I am working with is an integral part of the LEGO MINDSTORMS EV3. >> >> Signed-off-by: David Lechner >> --- >> .../bindings/display/sitronix,st7586.txt | 26 +++++++++++++++++++ >> 1 file changed, 26 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/display/sitronix,st7586.txt >> >> diff --git a/Documentation/devicetree/bindings/display/sitronix,st7586.txt >> b/Documentation/devicetree/bindings/display/sitronix,st7586.txt new file >> mode 100644 >> index 0000000..dfb0b7b >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/display/sitronix,st7586.txt >> @@ -0,0 +1,26 @@ >> +Sitronix ST7586 display panel >> + >> +Required properties: >> +- compatible: "lego,ev3-lcd". >> + >> +The node for this driver must be a child node of a SPI controller, hence >> +all mandatory properties described in ../spi/spi-bus.txt must be specified. >> + >> +Optional properties: >> +- dc-gpios: D/C pin. The presence/absence of this GPIO determines >> + the panel interface operation mode (IF[3:1] pins): >> + - present: IF=011 4-wire 8-bit data serial interface >> + - absent: IF=010 3-wire 9-bit data serial interface > > How does this work ? Do you have a single GPIO on your system connected to > IF[1], with IF[3:2] hardwired to 01 ? LEGO has not made the internals of the display publicly available, so I cannot say for sure. But I assume that IF[3:1] is hardwired to 011. This causes pin D1 to assigned to the signal A0, which is what we are calling the dc gpio here. If IF[3:1] were hardwired to 010, then pin D1 would be not not used and there would be no A0 signal. So, basically, we can infer the state of IF[3:1] by the fact that we have a dc pin or not. > >> +- reset-gpios: Reset pin >> +- power-supply: A regulator node for the supply voltage. >> +- backlight: phandle of the backlight device attached to the panel >> +- rotation: panel rotation in degrees counter clockwise (0,90,180,270) > > Please use the OF graph DT bindings (a.k.a. ports) to describe the connection > between the panel and its source. I am afraid that I do not understand this request. What would the source of the panel be? There is nothing like a SoC LCD controller that is driving this panel. > >> +Example: >> + display at 0{ >> + compatible = "lego,ev3-lcd"; >> + reg = <0>; >> + spi-max-frequency = <10000000>; >> + dc-gpios = <&gpio 43 GPIO_ACTIVE_HIGH>; >> + reset-gpios = <&gpio 80 GPIO_ACTIVE_HIGH>; >> + }; >