2022-12-27 11:08:38

by Javier Martinez Canillas

[permalink] [raw]
Subject: [PATCH v3 1/4] dt-bindings: display: Add Himax HX8394 panel controller

Add device tree bindings for panels based on the Himax HX8394 controller,
such as the HannStar HSD060BHW4 720x1440 TFT LCD panel that is connected
through a MIPI-DSI video interface.

Signed-off-by: Javier Martinez Canillas <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---

Changes in v3:
- Fix example snippet for `make dt_binding_check` to pass (Krzysztof Kozlowski).

Changes in v2:
- Drop redundant "bindings" in subject (Krzysztof Kozlowski).
- Drop "device tree bindings" in title (Krzysztof Kozlowski).
- Put port next to other "true" properties (Krzysztof Kozlowski).
- Add Krzysztof Kozlowski's Reviewed-by tag.

.../bindings/display/panel/himax,hx8394.yaml | 74 +++++++++++++++++++
1 file changed, 74 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
new file mode 100644
index 000000000000..fb1981cacfc8
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/himax,hx8394.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Himax HX8394 MIPI-DSI LCD panel controller
+
+maintainers:
+ - Javier Martinez Canillas <[email protected]>
+
+description:
+ Device tree bindings for panels based on the Himax HX8394 controller,
+ such as the HannStar HSD060BHW4 720x1440 TFT LCD panel connected with
+ a MIPI-DSI video interface.
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ enum:
+ # HannStar HSD060BHW4 5.99" 720x1440 TFT LCD panel
+ - hannstar,hsd060bhw4
+
+ reg: true
+
+ reset-gpios: true
+
+ backlight: true
+
+ port: true
+
+ vcc-supply:
+ description: Panel power supply
+
+ iovcc-supply:
+ description: I/O voltage supply
+
+required:
+ - compatible
+ - reg
+ - reset-gpios
+ - backlight
+ - port
+ - vcc-supply
+ - iovcc-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ panel@0 {
+ compatible = "hannstar,hsd060bhw4";
+ reg = <0>;
+ vcc-supply = <&reg_2v8_p>;
+ iovcc-supply = <&reg_1v8_p>;
+ reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
+ backlight = <&backlight>;
+
+ port {
+ mipi_in_panel: endpoint {
+ remote-endpoint = <&mipi_out_panel>;
+ };
+ };
+ };
+ };
+
+...
--
2.38.1


2022-12-27 18:25:27

by Jagan Teki

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: display: Add Himax HX8394 panel controller

On Tue, Dec 27, 2022 at 4:33 PM Javier Martinez Canillas
<[email protected]> wrote:
>
> Add device tree bindings for panels based on the Himax HX8394 controller,
> such as the HannStar HSD060BHW4 720x1440 TFT LCD panel that is connected
> through a MIPI-DSI video interface.
>
> Signed-off-by: Javier Martinez Canillas <[email protected]>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> ---
>
> Changes in v3:
> - Fix example snippet for `make dt_binding_check` to pass (Krzysztof Kozlowski).
>
> Changes in v2:
> - Drop redundant "bindings" in subject (Krzysztof Kozlowski).
> - Drop "device tree bindings" in title (Krzysztof Kozlowski).
> - Put port next to other "true" properties (Krzysztof Kozlowski).
> - Add Krzysztof Kozlowski's Reviewed-by tag.
>
> .../bindings/display/panel/himax,hx8394.yaml | 74 +++++++++++++++++++
> 1 file changed, 74 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
>
> diff --git a/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
> new file mode 100644
> index 000000000000..fb1981cacfc8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/himax,hx8394.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Himax HX8394 MIPI-DSI LCD panel controller
> +
> +maintainers:
> + - Javier Martinez Canillas <[email protected]>
> +
> +description:
> + Device tree bindings for panels based on the Himax HX8394 controller,
> + such as the HannStar HSD060BHW4 720x1440 TFT LCD panel connected with
> + a MIPI-DSI video interface.
> +
> +allOf:
> + - $ref: panel-common.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + # HannStar HSD060BHW4 5.99" 720x1440 TFT LCD panel
> + - hannstar,hsd060bhw4

Parent controller can have a compatible where the associated panels
will be enum list.

Jagan.

2022-12-27 19:52:10

by Javier Martinez Canillas

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: display: Add Himax HX8394 panel controller

Hello Jagan,

On Tue, Dec 27, 2022 at 7:16 PM Jagan Teki <[email protected]> wrote:

[...]

> > +allOf:
> > + - $ref: panel-common.yaml#
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + # HannStar HSD060BHW4 5.99" 720x1440 TFT LCD panel
> > + - hannstar,hsd060bhw4
>
> Parent controller can have a compatible where the associated panels
> will be enum list.
>

I'm not sure to follow what you meant. Could you please elaborate?

Best regards,
Javier

2022-12-27 20:14:34

by Jagan Teki

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: display: Add Himax HX8394 panel controller

On Wed, Dec 28, 2022 at 12:58 AM Javier Martinez Canillas
<[email protected]> wrote:
>
> Hello Jagan,
>
> On Tue, Dec 27, 2022 at 7:16 PM Jagan Teki <[email protected]> wrote:
>
> [...]
>
> > > +allOf:
> > > + - $ref: panel-common.yaml#
> > > +
> > > +properties:
> > > + compatible:
> > > + enum:
> > > + # HannStar HSD060BHW4 5.99" 720x1440 TFT LCD panel
> > > + - hannstar,hsd060bhw4
> >
> > Parent controller can have a compatible where the associated panels
> > will be enum list.
> >
>
> I'm not sure to follow what you meant. Could you please elaborate?

compatible:
items:
- enum:
- hannstar,hsd060bhw4
- const: himax,hx8394

himax,hx8394 is the actual controller and is denoted as fallback compatible.

Jagan.

2022-12-27 23:04:55

by Javier Martinez Canillas

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: display: Add Himax HX8394 panel controller

On Tue, Dec 27, 2022 at 8:37 PM Jagan Teki <[email protected]> wrote:
>
> On Wed, Dec 28, 2022 at 12:58 AM Javier Martinez Canillas
> <[email protected]> wrote:
> >
> > Hello Jagan,
> >
> > On Tue, Dec 27, 2022 at 7:16 PM Jagan Teki <[email protected]> wrote:
> >
> > [...]
> >
> > > > +allOf:
> > > > + - $ref: panel-common.yaml#
> > > > +
> > > > +properties:
> > > > + compatible:
> > > > + enum:
> > > > + # HannStar HSD060BHW4 5.99" 720x1440 TFT LCD panel
> > > > + - hannstar,hsd060bhw4
> > >
> > > Parent controller can have a compatible where the associated panels
> > > will be enum list.
> > >
> >
> > I'm not sure to follow what you meant. Could you please elaborate?
>
> compatible:
> items:
> - enum:
> - hannstar,hsd060bhw4
> - const: himax,hx8394
>
> himax,hx8394 is the actual controller and is denoted as fallback compatible.
>

I see. Do you have an example of a panel controller that does this? I
don't see that much value in doing this since you want the DTS to
describe the actual HW and so want the panel I believe.

But also there isn't an of_device_id entry for this fallback
controller compatible string. Feel free to propose that as a follow-up
if you think it is worth doing so.

Best regards,
Javier

2022-12-29 10:15:41

by Jagan Teki

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: display: Add Himax HX8394 panel controller

On Wed, Dec 28, 2022 at 3:46 AM Javier Martinez Canillas
<[email protected]> wrote:
>
> On Tue, Dec 27, 2022 at 8:37 PM Jagan Teki <[email protected]> wrote:
> >
> > On Wed, Dec 28, 2022 at 12:58 AM Javier Martinez Canillas
> > <[email protected]> wrote:
> > >
> > > Hello Jagan,
> > >
> > > On Tue, Dec 27, 2022 at 7:16 PM Jagan Teki <[email protected]> wrote:
> > >
> > > [...]
> > >
> > > > > +allOf:
> > > > > + - $ref: panel-common.yaml#
> > > > > +
> > > > > +properties:
> > > > > + compatible:
> > > > > + enum:
> > > > > + # HannStar HSD060BHW4 5.99" 720x1440 TFT LCD panel
> > > > > + - hannstar,hsd060bhw4
> > > >
> > > > Parent controller can have a compatible where the associated panels
> > > > will be enum list.
> > > >
> > >
> > > I'm not sure to follow what you meant. Could you please elaborate?
> >
> > compatible:
> > items:
> > - enum:
> > - hannstar,hsd060bhw4
> > - const: himax,hx8394
> >
> > himax,hx8394 is the actual controller and is denoted as fallback compatible.
> >
>
> I see. Do you have an example of a panel controller that does this? I
> don't see that much value in doing this since you want the DTS to
> describe the actual HW and so want the panel I believe.

Yes, but the Panel needs to be built on top of the display IC so the
actual parent here is the display IC and the panel is sub-HW. This is
what usually follows, here are some reference bindings.

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/display/panel/jadard,jd9365da-h3.yaml
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/display/panel/sitronix,st7701.yaml
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/display/panel/ilitek,ili9163.yaml
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/display/panel/ilitek,ili9322.yaml

Jagan.