diff mbox series

[v2,2/5] dt-bindings: panel: add binding for Xingbangda XBD599 panel

Message ID 20200316133503.144650-3-icenowy@aosc.io (mailing list archive)
State New, archived
Headers show
Series Add support for PinePhone LCD panel | expand

Commit Message

Icenowy Zheng March 16, 2020, 1:35 p.m. UTC
Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel.

Add its device tree binding.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
Changes in v2:
- Example fix.
- Format fix.

 .../display/panel/xingbangda,xbd599.yaml      | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml

Comments

Linus Walleij March 19, 2020, 2:14 p.m. UTC | #1
Hi Icenowy,

On Mon, Mar 16, 2020 at 2:37 PM Icenowy Zheng <icenowy@aosc.io> wrote:

> Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel.
>
> Add its device tree binding.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
(...)

> +properties:
> +  compatible:
> +    const: xingbangda,xbd599

As noticed in the review of the driver, this display is very close to
himax,hx8363.

I think the best is to determin what actual display controller it is,
I think it is some kind of Ilitek controller since Ilitek ili9342 is
clearly very similar.

The best would be something like name the bindings
ilitek-ili9342.yaml and then:

properties:
  compatible:
    items:
      - const: xingbangda,xbd599
      - const: ilitek,ili9342

Possibly use oneOf and add support for the himax,hx8363
already while you're at it.

Yours,
Linus Walleij
Icenowy Zheng March 20, 2020, 7:58 a.m. UTC | #2
于 2020年3月19日 GMT+08:00 下午10:14:27, Linus Walleij <linus.walleij@linaro.org> 写到:
>Hi Icenowy,
>
>On Mon, Mar 16, 2020 at 2:37 PM Icenowy Zheng <icenowy@aosc.io> wrote:
>
>> Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel.
>>
>> Add its device tree binding.
>>
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>(...)
>
>> +properties:
>> +  compatible:
>> +    const: xingbangda,xbd599
>
>As noticed in the review of the driver, this display is very close to
>himax,hx8363.
>
>I think the best is to determin what actual display controller it is,
>I think it is some kind of Ilitek controller since Ilitek ili9342 is
>clearly very similar.

It's Sitronix ST7703, same as the Librem 5 panel.

>
>The best would be something like name the bindings
>ilitek-ili9342.yaml and then:
>
>properties:
>  compatible:
>    items:
>      - const: xingbangda,xbd599
>      - const: ilitek,ili9342
>
>Possibly use oneOf and add support for the himax,hx8363
>already while you're at it.
>
>Yours,
>Linus Walleij
>
>_______________________________________________
>linux-arm-kernel mailing list
>linux-arm-kernel@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Linus Walleij March 20, 2020, 9:11 a.m. UTC | #3
On Fri, Mar 20, 2020 at 9:07 AM Icenowy Zheng <icenowy@aosc.io> wrote:
> 于 2020年3月19日 GMT+08:00 下午10:14:27, Linus Walleij <linus.walleij@linaro.org> 写到:
> >On Mon, Mar 16, 2020 at 2:37 PM Icenowy Zheng <icenowy@aosc.io> wrote:

> >As noticed in the review of the driver, this display is very close to
> >himax,hx8363.
> >
> >I think the best is to determin what actual display controller it is,
> >I think it is some kind of Ilitek controller since Ilitek ili9342 is
> >clearly very similar.
>
> It's Sitronix ST7703, same as the Librem 5 panel.

Heh, I wonder how it comes that it is so similar to Ilitek.
I guess I will never understand how the silicon ecosystem works
in asia (I did read a lot of Bunnie Huang's articles and hardware
hacking book to try to understand...)

This file should be named sitronix,st7703.yaml then.

According to the code in the Librem 5:
https://source.puri.sm/Librem5/linux-next/blob/imx8-current-librem5/drivers/gpu/drm/panel/panel-sitronix-st7701.c
The actual name of the display is Techstar ts8550b.
And the display controller is st7701, so maybe we should
actually name it sitronix,st770x.yaml if there are some
sub-variants of st770x?

> >properties:
> >  compatible:
> >    items:
> >      - const: xingbangda,xbd599
> >      - const: ilitek,ili9342
> >
> >Possibly use oneOf and add support for the himax,hx8363
> >already while you're at it.

This should at least be:

compatible:
   items:
     - enum:
       - xingbangda,xbd599
       - himax,hx8363
       - techstar,ts8550b
     - enum:
       - sitronix,st7701
       - sitronix,st7703

So panel nodes using this panel become
compatible = "xingbangda,sbd599", "sitronix,st7703"
etc.

This way it is straight-forward for drivers to identify the panel
vendor and display controller.

Yours,
Linus Walleij
Icenowy Zheng March 20, 2020, 9:21 a.m. UTC | #4
于 2020年3月20日 GMT+08:00 下午5:11:22, Linus Walleij <linus.walleij@linaro.org> 写到:
>On Fri, Mar 20, 2020 at 9:07 AM Icenowy Zheng <icenowy@aosc.io> wrote:
>> 于 2020年3月19日 GMT+08:00 下午10:14:27, Linus Walleij
><linus.walleij@linaro.org> 写到:
>> >On Mon, Mar 16, 2020 at 2:37 PM Icenowy Zheng <icenowy@aosc.io>
>wrote:
>
>> >As noticed in the review of the driver, this display is very close
>to
>> >himax,hx8363.
>> >
>> >I think the best is to determin what actual display controller it
>is,
>> >I think it is some kind of Ilitek controller since Ilitek ili9342 is
>> >clearly very similar.
>>
>> It's Sitronix ST7703, same as the Librem 5 panel.
>
>Heh, I wonder how it comes that it is so similar to Ilitek.
>I guess I will never understand how the silicon ecosystem works
>in asia (I did read a lot of Bunnie Huang's articles and hardware
>hacking book to try to understand...)
>
>This file should be named sitronix,st7703.yaml then.
>
>According to the code in the Librem 5:
>https://source.puri.sm/Librem5/linux-next/blob/imx8-current-librem5/drivers/gpu/drm/panel/panel-sitronix-st7701.c
>The actual name of the display is Techstar ts8550b.

Sorry, for Librem 5 panel, I mean Rocktech JH057N00900 here.

This is also the code that my patchset based on.

>And the display controller is st7701, so maybe we should
>actually name it sitronix,st770x.yaml if there are some
>sub-variants of st770x?
>
>> >properties:
>> >  compatible:
>> >    items:
>> >      - const: xingbangda,xbd599
>> >      - const: ilitek,ili9342
>> >
>> >Possibly use oneOf and add support for the himax,hx8363
>> >already while you're at it.
>
>This should at least be:
>
>compatible:
>   items:
>     - enum:
>       - xingbangda,xbd599
>       - himax,hx8363
>       - techstar,ts8550b
>     - enum:
>       - sitronix,st7701
>       - sitronix,st7703
>
>So panel nodes using this panel become
>compatible = "xingbangda,sbd599", "sitronix,st7703"
>etc.
>
>This way it is straight-forward for drivers to identify the panel
>vendor and display controller.
>
>Yours,
>Linus Walleij
>
>_______________________________________________
>linux-arm-kernel mailing list
>linux-arm-kernel@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
new file mode 100644
index 000000000000..b27bcf11198f
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
@@ -0,0 +1,50 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/xingbangda,xbd599.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xingbangda XBD599 5.99in MIPI-DSI LCD panel
+
+maintainers:
+  - Icenowy Zheng <icenowy@aosc.io>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    const: xingbangda,xbd599
+  reg: true
+  backlight: true
+  reset-gpios: true
+  vcc-supply:
+    description: regulator that supplies the VCC voltage
+  iovcc-supply:
+    description: regulator that supplies the IOVCC voltage
+
+required:
+  - compatible
+  - reg
+  - backlight
+  - vcc-supply
+  - iovcc-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    dsi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        panel@0 {
+            compatible = "xingbangda,xbd599";
+            reg = <0>;
+            backlight = <&backlight>;
+            iovcc-supply = <&reg_dldo2>;
+            vcc-supply = <&reg_ldo_io0>;
+        };
+    };
+
+...