Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1703484 > unrolled thread
| Started by | David Lechner <david@lechnology.com> |
|---|---|
| First post | 2017-08-04 00:40 +0200 |
| Last post | 2017-08-04 15:20 +0200 |
| Articles | 12 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v3 0/6] Support for LEGO MINDSTORMS EV3 LCD display David Lechner <david@lechnology.com> - 2017-08-04 00:40 +0200
[PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels David Lechner <david@lechnology.com> - 2017-08-04 00:40 +0200
Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels Noralf Trønnes <noralf@tronnes.org> - 2017-08-04 11:50 +0200
Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels David Lechner <david@lechnology.com> - 2017-08-04 19:00 +0200
Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels Noralf Trønnes <noralf@tronnes.org> - 2017-08-04 20:10 +0200
Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2017-08-04 17:00 +0200
Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels David Lechner <david@lechnology.com> - 2017-08-04 18:00 +0200
Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2017-08-04 21:40 +0200
Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels David Lechner <david@lechnology.com> - 2017-08-05 18:20 +0200
Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels Noralf Trønnes <noralf@tronnes.org> - 2017-08-04 19:40 +0200
[PATCH v3 1/6] drm/tinydrm: remove call to mipi_dbi_init() from mipi_dbi_spi_init() David Lechner <david@lechnology.com> - 2017-08-04 00:40 +0200
Re: [PATCH v3 1/6] drm/tinydrm: remove call to mipi_dbi_init() from mipi_dbi_spi_init() Noralf Trønnes <noralf@tronnes.org> - 2017-08-04 15:20 +0200
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2017-08-04 00:40 +0200 |
| Subject | [PATCH v3 0/6] Support for LEGO MINDSTORMS EV3 LCD display |
| Message-ID | <uawWB-6uI-3@gated-at.bofh.it> |
The goal of this series is to get the built-in LCD of the LEGO MINDSTORMS EV3 working. v2 changes: * Wrote a new driver for ST7586 instead of combining it with existing drivers * Don't touch MIPI DBI code (other than the patch suggested by Noralf) * New defconfig patch v3 changes: * New patch to generalize tinydrm_xrgb8888_to_gray8() so that it can be reused. * Device tree bindings in separate patch. * Fixed incorrect device tree binding pin descriptions. * Added MAINTAINERS entry for drivers/gpu/drm/tinydrm/st7586.c. * Removed "mipi_dbi_" from function names in st7586.c. * Moved init and fini to pipe_enable and pipe_disable ops. * Dropped RGB565 format. * Made adjustments for the fact the controller cannot be read via SPI. * Dropped st7586.h - values moved into st7586.c. David Lechner (6): drm/tinydrm: remove call to mipi_dbi_init() from mipi_dbi_spi_init() drm/tinydrm: generalize tinydrm_xrgb8888_to_gray8() dt-bindings: add binding for Sitronix ST7586 display panels drm/tinydrm: add support for LEGO MINDSTORMS EV3 LCD ARM: dts: da850-lego-ev3: Add node for LCD display ARM: davinci_all_defconfig: enable tinydrm and ST7586 .../bindings/display/sitronix,st7586.txt | 26 ++ MAINTAINERS | 6 + arch/arm/boot/dts/da850-lego-ev3.dts | 24 ++ arch/arm/configs/davinci_all_defconfig | 2 + drivers/gpu/drm/tinydrm/Kconfig | 10 + drivers/gpu/drm/tinydrm/Makefile | 1 + drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c | 35 +- drivers/gpu/drm/tinydrm/mi0283qt.c | 8 +- drivers/gpu/drm/tinydrm/mipi-dbi.c | 17 +- drivers/gpu/drm/tinydrm/repaper.c | 21 +- drivers/gpu/drm/tinydrm/st7586.c | 466 +++++++++++++++++++++ include/drm/tinydrm/mipi-dbi.h | 6 +- include/drm/tinydrm/tinydrm-helpers.h | 3 +- 13 files changed, 582 insertions(+), 43 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/sitronix,st7586.txt create mode 100644 drivers/gpu/drm/tinydrm/st7586.c -- 2.7.4
[toc] | [next] | [standalone]
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2017-08-04 00:40 +0200 |
| Subject | [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels |
| Message-ID | <uawWC-6uI-29@gated-at.bofh.it> |
| In reply to | #1703484 |
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 <david@lechnology.com>
---
.../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
+- 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)
+
+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>;
+ };
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Noralf Trønnes <noralf@tronnes.org> |
|---|---|
| Date | 2017-08-04 11:50 +0200 |
| Subject | Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels |
| Message-ID | <uaHoZ-5ix-7@gated-at.bofh.it> |
| In reply to | #1703486 |
Den 04.08.2017 00.33, skrev David Lechner:
> 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.
Is this display available outside of this Lego part?
If not you can remove the properties you don't need for this particular
display setup. Another st7586 display with a different panel would need
a different initialization sequence and compatible string, so we can
add properties when/if that happens.
Noralf.
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
> .../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
> +- 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)
> +
> +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>;
> + };
[toc] | [prev] | [next] | [standalone]
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2017-08-04 19:00 +0200 |
| Subject | Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels |
| Message-ID | <uaO77-15B-7@gated-at.bofh.it> |
| In reply to | #1703833 |
On 08/04/2017 04:48 AM, Noralf Trønnes wrote:
>
> Den 04.08.2017 00.33, skrev David Lechner:
>> 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.
>
> Is this display available outside of this Lego part?
No, it is not.
> If not you can remove the properties you don't need for this particular
> display setup. Another st7586 display with a different panel would need
> a different initialization sequence and compatible string, so we can
> add properties when/if that happens.
OK. so I will drop power-supply and backlight.
Should I remove these from the driver as well? There are some panels out
there that could use them.[1]
[1]:
http://www.buydisplay.com/download/manual/ERC240160-1_Series_Datasheet.pdf
>
> Noralf.
>
>> Signed-off-by: David Lechner <david@lechnology.com>
>> ---
>> .../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
>> +- 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)
>> +
>> +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>;
>> + };
>
[toc] | [prev] | [next] | [standalone]
| From | Noralf Trønnes <noralf@tronnes.org> |
|---|---|
| Date | 2017-08-04 20:10 +0200 |
| Subject | Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels |
| Message-ID | <uaPcS-20M-1@gated-at.bofh.it> |
| In reply to | #1704106 |
Den 04.08.2017 18.51, skrev David Lechner:
> On 08/04/2017 04:48 AM, Noralf Trønnes wrote:
>>
>> Den 04.08.2017 00.33, skrev David Lechner:
>>> 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.
>>
>> Is this display available outside of this Lego part?
> No, it is not.
>
>> If not you can remove the properties you don't need for this particular
>> display setup. Another st7586 display with a different panel would need
>> a different initialization sequence and compatible string, so we can
>> add properties when/if that happens.
>
> OK. so I will drop power-supply and backlight.
>
And the dc/reset gpios should be required properties since your display
won't work without them (or rather they're hardwired that way).
> Should I remove these from the driver as well? There are some panels
> out there that could use them.[1]
>
> [1]:
> http://www.buydisplay.com/download/manual/ERC240160-1_Series_Datasheet.pdf
>
Yes, because that display won't work with the driver as-is, so it's
really dead code. If someone wants to add support for that display,
they'll add the necessary code. When maintaining code for 10-20 years,
it's important to not add code that 'might' be used in the future.
Let the future take care of itself and keep the codebase slim :-)
Noralf.
>>
>> Noralf.
>>
>>> Signed-off-by: David Lechner <david@lechnology.com>
>>> ---
>>> .../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
>>> +- 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)
>>> +
>>> +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>;
>>> + };
>>
>
[toc] | [prev] | [next] | [standalone]
| From | Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
|---|---|
| Date | 2017-08-04 17:00 +0200 |
| Subject | Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels |
| Message-ID | <uaMf0-8ke-17@gated-at.bofh.it> |
| In reply to | #1703486 |
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 <david@lechnology.com>
> ---
> .../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 ?
> +- 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.
> +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>;
> + };
--
Regards,
Laurent Pinchart
[toc] | [prev] | [next] | [standalone]
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2017-08-04 18:00 +0200 |
| Subject | Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels |
| Message-ID | <uaNb4-v7-7@gated-at.bofh.it> |
| In reply to | #1704054 |
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 <david@lechnology.com>
>> ---
>> .../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>;
>> + };
>
[toc] | [prev] | [next] | [standalone]
| From | Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
|---|---|
| Date | 2017-08-04 21:40 +0200 |
| Subject | Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels |
| Message-ID | <uaQBY-2MF-15@gated-at.bofh.it> |
| In reply to | #1704091 |
Hi David,
On Friday 04 Aug 2017 10:51:37 David Lechner wrote:
> On 08/04/2017 09:54 AM, Laurent Pinchart wrote:
> > 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 <david@lechnology.com>
> >> ---
> >>
> >> .../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.
OK, now I understand what you mean. Maybe you should phrase it a bit
differently to make it clearer ? How about
dc-gpios: Specified or the GPIO connected to the panel's D/C pin (also called
A0). The property is required when the panel operates in 4-wire mode (IF[3:1]
= 011) and prohibited when the panel operates in 3-wire mode (IF[3:1] = 010).
By the way, if the signal is named A0, why don't you call the property a0-
gpios ?
> >> +- 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.
My bad, I should have read the panel datasheet before replying :-S Please
ignore this comment.
> >> +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>;
> >> + };
--
Regards,
Laurent Pinchart
[toc] | [prev] | [next] | [standalone]
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2017-08-05 18:20 +0200 |
| Subject | Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels |
| Message-ID | <ub9XX-7gl-1@gated-at.bofh.it> |
| In reply to | #1704180 |
On 08/04/2017 02:39 PM, Laurent Pinchart wrote:
> Hi David,
>
> On Friday 04 Aug 2017 10:51:37 David Lechner wrote:
>> On 08/04/2017 09:54 AM, Laurent Pinchart wrote:
>>> 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 <david@lechnology.com>
>>>> ---
>>>>
>>>> .../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.
>
> OK, now I understand what you mean. Maybe you should phrase it a bit
> differently to make it clearer ? How about
>
> dc-gpios: Specified or the GPIO connected to the panel's D/C pin (also called
> A0). The property is required when the panel operates in 4-wire mode (IF[3:1]
> = 011) and prohibited when the panel operates in 3-wire mode (IF[3:1] = 010).
Yes, this is more clear. Thank you for the suggestion.
>
> By the way, if the signal is named A0, why don't you call the property a0-
> gpios ?
I consider "dc-gpios" to be a generic name since it is used by many
different panels. But I would be OK with calling it "a0-gpios" as well.
It will just require more explanation that this is the A0 *signal* and
not the A0 *pin*. The actual pin used is labeled *D1* on the controller.
On the other hand, it is labeled as A0 on LEGO's schematic, so perhaps
a0 is better.
>
>>>> +- 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.
>
> My bad, I should have read the panel datasheet before replying :-S Please
> ignore this comment.
>
>>>> +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>;
>>>> + };
>
[toc] | [prev] | [next] | [standalone]
| From | Noralf Trønnes <noralf@tronnes.org> |
|---|---|
| Date | 2017-08-04 19:40 +0200 |
| Subject | Re: [PATCH v3 3/6] dt-bindings: add binding for Sitronix ST7586 display panels |
| Message-ID | <uaOJP-1Av-5@gated-at.bofh.it> |
| In reply to | #1704054 |
Hi Laurent,
Den 04.08.2017 16.54, skrev Laurent Pinchart:
> 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 <david@lechnology.com>
>> ---
>> .../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 ?
>
>> +- 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.
This display has a controller with onboard memory that is scanned out
to the panel. The controller is connected, in this instance, through SPI.
Both initialization and pixel data is transferred over SPI. It resembles
the MIPI DCS/DBI standard except that it misses some of the commands and
has non standard formats: 2-bit greyscale and monochrome. MIPI DBI only
supports rgb formats (3, 8, 12, 16 and 18-bits). So it isn't a drm panel
in the sense as one connected through MIPI DSI or MIPI DPI.
MIPI DBI has 3 interface types:
- 8/9/16/18 bit parallel bus + Data/Command signal (8080 or motorola bus)
- 8/16 bit SPI + D/C signal
- 9 bit SPI (D/C as first bit)
Noralf.
>> +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>;
>> + };
[toc] | [prev] | [next] | [standalone]
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2017-08-04 00:40 +0200 |
| Subject | [PATCH v3 1/6] drm/tinydrm: remove call to mipi_dbi_init() from mipi_dbi_spi_init() |
| Message-ID | <uawWC-6uI-31@gated-at.bofh.it> |
| In reply to | #1703484 |
This removes the call to mipi_dbi_init() from mipi_dbi_spi_init() so that
drivers can have a driver-specific implementation if needed.
Suggested-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: David Lechner <david@lechnology.com>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
---
drivers/gpu/drm/tinydrm/mi0283qt.c | 8 ++++++--
drivers/gpu/drm/tinydrm/mipi-dbi.c | 17 +++++------------
include/drm/tinydrm/mipi-dbi.h | 6 +-----
3 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c
index 482ff1c3..7e5bb7d 100644
--- a/drivers/gpu/drm/tinydrm/mi0283qt.c
+++ b/drivers/gpu/drm/tinydrm/mi0283qt.c
@@ -195,8 +195,12 @@ static int mi0283qt_probe(struct spi_device *spi)
device_property_read_u32(dev, "rotation", &rotation);
- ret = mipi_dbi_spi_init(spi, mipi, dc, &mi0283qt_pipe_funcs,
- &mi0283qt_driver, &mi0283qt_mode, rotation);
+ ret = mipi_dbi_spi_init(spi, mipi, dc);
+ if (ret)
+ return ret;
+
+ ret = mipi_dbi_init(&spi->dev, mipi, &mi0283qt_pipe_funcs,
+ &mi0283qt_driver, &mi0283qt_mode, rotation);
if (ret)
return ret;
diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c
index e10fa4b..cba9784 100644
--- a/drivers/gpu/drm/tinydrm/mipi-dbi.c
+++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c
@@ -777,15 +777,12 @@ static int mipi_dbi_typec3_command(struct mipi_dbi *mipi, u8 cmd,
/**
* mipi_dbi_spi_init - Initialize MIPI DBI SPI interfaced controller
* @spi: SPI device
- * @dc: D/C gpio (optional)
* @mipi: &mipi_dbi structure to initialize
- * @pipe_funcs: Display pipe functions
- * @driver: DRM driver
- * @mode: Display mode
- * @rotation: Initial rotation in degrees Counter Clock Wise
+ * @dc: D/C gpio (optional)
*
* This function sets &mipi_dbi->command, enables &mipi->read_commands for the
- * usual read commands and initializes @mipi using mipi_dbi_init().
+ * usual read commands. It should be followed by a call to mipi_dbi_init() or
+ * a driver-specific init.
*
* If @dc is set, a Type C Option 3 interface is assumed, if not
* Type C Option 1.
@@ -800,11 +797,7 @@ static int mipi_dbi_typec3_command(struct mipi_dbi *mipi, u8 cmd,
* Zero on success, negative error code on failure.
*/
int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi,
- struct gpio_desc *dc,
- const struct drm_simple_display_pipe_funcs *pipe_funcs,
- struct drm_driver *driver,
- const struct drm_display_mode *mode,
- unsigned int rotation)
+ struct gpio_desc *dc)
{
size_t tx_size = tinydrm_spi_max_transfer_size(spi, 0);
struct device *dev = &spi->dev;
@@ -850,7 +843,7 @@ int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi,
return -ENOMEM;
}
- return mipi_dbi_init(dev, mipi, pipe_funcs, driver, mode, rotation);
+ return 0;
}
EXPORT_SYMBOL(mipi_dbi_spi_init);
diff --git a/include/drm/tinydrm/mipi-dbi.h b/include/drm/tinydrm/mipi-dbi.h
index d137b16..83346dd 100644
--- a/include/drm/tinydrm/mipi-dbi.h
+++ b/include/drm/tinydrm/mipi-dbi.h
@@ -62,11 +62,7 @@ mipi_dbi_from_tinydrm(struct tinydrm_device *tdev)
}
int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi,
- struct gpio_desc *dc,
- const struct drm_simple_display_pipe_funcs *pipe_funcs,
- struct drm_driver *driver,
- const struct drm_display_mode *mode,
- unsigned int rotation);
+ struct gpio_desc *dc);
int mipi_dbi_init(struct device *dev, struct mipi_dbi *mipi,
const struct drm_simple_display_pipe_funcs *pipe_funcs,
struct drm_driver *driver,
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Noralf Trønnes <noralf@tronnes.org> |
|---|---|
| Date | 2017-08-04 15:20 +0200 |
| Subject | Re: [PATCH v3 1/6] drm/tinydrm: remove call to mipi_dbi_init() from mipi_dbi_spi_init() |
| Message-ID | <uaKGf-7th-43@gated-at.bofh.it> |
| In reply to | #1703488 |
Den 04.08.2017 00.33, skrev David Lechner:
> This removes the call to mipi_dbi_init() from mipi_dbi_spi_init() so that
> drivers can have a driver-specific implementation if needed.
>
> Suggested-by: Noralf Trønnes <noralf@tronnes.org>
> Signed-off-by: David Lechner <david@lechnology.com>
> Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
> ---
Thanks, applied to drm-misc.
Noralf.
> drivers/gpu/drm/tinydrm/mi0283qt.c | 8 ++++++--
> drivers/gpu/drm/tinydrm/mipi-dbi.c | 17 +++++------------
> include/drm/tinydrm/mipi-dbi.h | 6 +-----
> 3 files changed, 12 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c
> index 482ff1c3..7e5bb7d 100644
> --- a/drivers/gpu/drm/tinydrm/mi0283qt.c
> +++ b/drivers/gpu/drm/tinydrm/mi0283qt.c
> @@ -195,8 +195,12 @@ static int mi0283qt_probe(struct spi_device *spi)
>
> device_property_read_u32(dev, "rotation", &rotation);
>
> - ret = mipi_dbi_spi_init(spi, mipi, dc, &mi0283qt_pipe_funcs,
> - &mi0283qt_driver, &mi0283qt_mode, rotation);
> + ret = mipi_dbi_spi_init(spi, mipi, dc);
> + if (ret)
> + return ret;
> +
> + ret = mipi_dbi_init(&spi->dev, mipi, &mi0283qt_pipe_funcs,
> + &mi0283qt_driver, &mi0283qt_mode, rotation);
> if (ret)
> return ret;
>
> diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c
> index e10fa4b..cba9784 100644
> --- a/drivers/gpu/drm/tinydrm/mipi-dbi.c
> +++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c
> @@ -777,15 +777,12 @@ static int mipi_dbi_typec3_command(struct mipi_dbi *mipi, u8 cmd,
> /**
> * mipi_dbi_spi_init - Initialize MIPI DBI SPI interfaced controller
> * @spi: SPI device
> - * @dc: D/C gpio (optional)
> * @mipi: &mipi_dbi structure to initialize
> - * @pipe_funcs: Display pipe functions
> - * @driver: DRM driver
> - * @mode: Display mode
> - * @rotation: Initial rotation in degrees Counter Clock Wise
> + * @dc: D/C gpio (optional)
> *
> * This function sets &mipi_dbi->command, enables &mipi->read_commands for the
> - * usual read commands and initializes @mipi using mipi_dbi_init().
> + * usual read commands. It should be followed by a call to mipi_dbi_init() or
> + * a driver-specific init.
> *
> * If @dc is set, a Type C Option 3 interface is assumed, if not
> * Type C Option 1.
> @@ -800,11 +797,7 @@ static int mipi_dbi_typec3_command(struct mipi_dbi *mipi, u8 cmd,
> * Zero on success, negative error code on failure.
> */
> int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi,
> - struct gpio_desc *dc,
> - const struct drm_simple_display_pipe_funcs *pipe_funcs,
> - struct drm_driver *driver,
> - const struct drm_display_mode *mode,
> - unsigned int rotation)
> + struct gpio_desc *dc)
> {
> size_t tx_size = tinydrm_spi_max_transfer_size(spi, 0);
> struct device *dev = &spi->dev;
> @@ -850,7 +843,7 @@ int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi,
> return -ENOMEM;
> }
>
> - return mipi_dbi_init(dev, mipi, pipe_funcs, driver, mode, rotation);
> + return 0;
> }
> EXPORT_SYMBOL(mipi_dbi_spi_init);
>
> diff --git a/include/drm/tinydrm/mipi-dbi.h b/include/drm/tinydrm/mipi-dbi.h
> index d137b16..83346dd 100644
> --- a/include/drm/tinydrm/mipi-dbi.h
> +++ b/include/drm/tinydrm/mipi-dbi.h
> @@ -62,11 +62,7 @@ mipi_dbi_from_tinydrm(struct tinydrm_device *tdev)
> }
>
> int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi,
> - struct gpio_desc *dc,
> - const struct drm_simple_display_pipe_funcs *pipe_funcs,
> - struct drm_driver *driver,
> - const struct drm_display_mode *mode,
> - unsigned int rotation);
> + struct gpio_desc *dc);
> int mipi_dbi_init(struct device *dev, struct mipi_dbi *mipi,
> const struct drm_simple_display_pipe_funcs *pipe_funcs,
> struct drm_driver *driver,
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web